DayZ 1.28
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 строка 634

635 {
636 int count = Count();
637 int new_index = curr_index;
638
639 if ( move_number > 0 )
640 {
642 }
643
644 if ( move_number < 0 )
645 {
647
648 if ( new_index < 0 )
649 {
650 if ( new_index <= -count )
651 {
653 }
654
656 }
657 }
658
659 if ( new_index >= count )
660 {
662 }
663
664 // move_number is 0
665 return new_index;
666 }
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native int Count()

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