@@ -31,6 +31,7 @@ void CLuaPedDefs::LoadFunctions(void)
3131 CLuaCFunctions::AddFunction (" getPedWeapon" , GetPedWeapon);
3232 CLuaCFunctions::AddFunction (" getPedClothes" , GetPedClothes);
3333 CLuaCFunctions::AddFunction (" doesPedHaveJetPack" , DoesPedHaveJetPack);
34+ CLuaCFunctions::AddFunction (" isPedWearingJetpack" , DoesPedHaveJetPack); // introduced in 1.5.5-9.13176
3435 CLuaCFunctions::AddFunction (" isPedOnGround" , IsPedOnGround);
3536 CLuaCFunctions::AddFunction (" getPedFightingStyle" , GetPedFightingStyle);
3637 CLuaCFunctions::AddFunction (" getPedWalkingStyle" , GetPedMoveAnim);
@@ -104,20 +105,19 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
104105 lua_classfunction (luaVM, " isInWater" , " isPedInWater" );
105106 lua_classfunction (luaVM, " isOnGround" , " isPedOnGround" );
106107 lua_classfunction (luaVM, " isInVehicle" , " isPedInVehicle" );
107-
108108 lua_classfunction (luaVM, " isOnFire" , " isPedOnFire" );
109109 lua_classfunction (luaVM, " isChoking" , " isPedChoking" );
110110 lua_classfunction (luaVM, " isDoingGangDriveby" , " isPedDoingGangDriveby" );
111111 lua_classfunction (luaVM, " isFrozen" , " isPedFrozen" );
112112 lua_classfunction (luaVM, " isHeadless" , " isPedHeadless" );
113+ lua_classfunction (luaVM, " isWearingJetpack" , " isPedWearingJetpack" ); // introduced in 1.5.5-9.13176
113114
114115 lua_classfunction (luaVM, " getArmor" , " getPedArmor" );
115116 lua_classfunction (luaVM, " getFightingStyle" , " getPedFightingStyle" );
116117 lua_classfunction (luaVM, " getGravity" , " getPedGravity" );
117118 lua_classfunction (luaVM, " getStat" , " getPedStat" );
118119 lua_classfunction (luaVM, " getWeaponSlot" , " getPedWeaponSlot" );
119120 lua_classfunction (luaVM, " getWalkingStyle" , " getPedWalkingStyle" );
120-
121121 lua_classfunction (luaVM, " getAmmoInClip" , " getPedAmmoInClip" );
122122 lua_classfunction (luaVM, " getOccupiedVehicle" , " getPedOccupiedVehicle" );
123123 lua_classfunction (luaVM, " getWeapon" , " getPedWeapon" );
@@ -162,13 +162,10 @@ void CLuaPedDefs::AddClass(lua_State* luaVM)
162162 GetPedOccupiedVehicle); // what about removePedFromVehicle?
163163 lua_classvariable (luaVM, " dead" , " killPed" , " isPedDead" ); // Setting this to any value will still kill the ped. Should we special case this?
164164 lua_classvariable (luaVM, " walkingStyle" , " setPedWalkingStyle" , " getPedWalkingStyle" );
165- lua_classvariable (luaVM, " jetpack" , " setPedWearingJetpack" , " doesPedHaveJetPack " );
165+ lua_classvariable (luaVM, " jetpack" , " setPedWearingJetpack" , " isPedWearingJetpack " ); // introduced in 1.5.5-9.13176
166166 // lua_classvariable ( luaVM, "stats", "setPedStat", "getPedStat", CLuaOOPDefs::SetPedStat, CLuaOOPDefs::GetPedStat ); // table
167167 // lua_classvariable ( luaVM, "controlState", "setPedControlState", "getPedControlState", CLuaOOPDefs::SetPedControlState, CLuaOOPDefs::GetPedControlState
168168 // ); // TODO: .controlState["control"] = value
169- // This commented code will syntax error, a new method has to be implemented to support this
170- // lua_classvariable ( luaVM, "jetpack", {"removePedJetPack","givePedJetPack}, "doesPedHaveJetPack", CLuaOOPDefs::SetJetpackActive, "doesPedHaveJetPack" );
171- // // very specialised!
172169
173170 lua_registerclass (luaVM, " Ped" , " Element" );
174171}
0 commit comments