Fix for issue #842

1164-fix
Droog71 2018-12-27 17:29:39 -05:00 committed by Mateusz Przybył
parent 6a0234edd5
commit f449d9c800
1 changed files with 5 additions and 0 deletions

View File

@ -3400,6 +3400,7 @@ void CScriptFunctions::Init()
bc->AddItem("load", CBotTypResult(CBotTypPointer, "object"), CBotVar::ProtectionLevel::ReadOnly);
bc->AddItem("id", CBotTypResult(CBotTypInt), CBotVar::ProtectionLevel::ReadOnly);
bc->AddItem("team", CBotTypResult(CBotTypInt), CBotVar::ProtectionLevel::ReadOnly);
bc->AddItem("dead", CBotTypResult(CBotTypBoolean), CBotVar::ProtectionLevel::ReadOnly);
bc->AddItem("velocity", CBotTypResult(CBotTypClass, "point"), CBotVar::ProtectionLevel::ReadOnly);
CBotProgram::AddFunction("endmission",rEndMission,cEndMission);
@ -3598,6 +3599,10 @@ void CScriptFunctions::uObject(CBotVar* botThis, void* user)
value = object->GetTeam();
pVar->SetValInt(value);
pVar = pVar->GetNext(); // "dead"
value = object->IsDying();
pVar->SetValInt(value);
// Updates the velocity of the object.
pVar = pVar->GetNext(); // "velocity"
if (IsObjectBeingTransported(object) || physics == nullptr)