Fix for issue #842
parent
6a0234edd5
commit
f449d9c800
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue