DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ MoveIndex()

int array< Class T >::MoveIndex ( int curr_index,
int move_number )
inlineprivate

Returns a index in array moved by specific number.

Возвращает
int Moved index in this array
Print( "Count: "+ my_array.Count() );
Print( "Moved 1:"+ my_array.MoveIndex(2, 1) );
Print( "Moved 3:"+ my_array.MoveIndex(2, 2) );
>> "Count: 4"
>> "Moved index 2 by 1: 3";
>> "Moved index 2 by 2: 0";
proto void Print(void var)
Prints content of variable to console/log.

См. определение в файле EnScript.c строка 610

611 {
612 int count = Count();
613 int new_index = curr_index;
614
615 if ( move_number > 0 )
616 {
618 }
619
620 if ( move_number < 0 )
621 {
623
624 if ( new_index < 0 )
625 {
626 if ( new_index <= -count )
627 {
629 }
630
632 }
633 }
634
635 if ( new_index >= count )
636 {
638 }
639
640 // move_number is 0
641 return new_index;
642 }
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native int Count()

Перекрестные ссылки Count.