DayZ 1.29
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 строка 636

637 {
638 int count = Count();
639 int new_index = curr_index;
640
641 if ( move_number > 0 )
642 {
644 }
645
646 if ( move_number < 0 )
647 {
649
650 if ( new_index < 0 )
651 {
652 if ( new_index <= -count )
653 {
655 }
656
658 }
659 }
660
661 if ( new_index >= count )
662 {
664 }
665
666 // move_number is 0
667 return new_index;
668 }
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native int Count()

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