objects: Remove OCF_Living in favor of OCF_Alive

Günther Brammer 2011-01-02 19:40:48 +01:00
parent c9f8a695be
commit 846e707134
4 changed files with 5 additions and 12 deletions

View File

@ -110,7 +110,7 @@ const uint32_t
OCF_HitSpeed2 = 1<<12,
OCF_HitSpeed3 = 1<<13,
OCF_Collection = 1<<14,
OCF_Living = 1<<15,
OCF_HitSpeed4 = 1<<16,
OCF_Prey = 1<<17,
OCF_AttractLightning = 1<<18,

View File

@ -804,12 +804,8 @@ void C4Object::SetOCF()
if (!pActionDef || (!pActionDef->GetPropertyInt(P_ObjectDisabled)))
if (NoCollectDelay==0)
OCF|=OCF_Collection;
// OCF_Living
if (Category & C4D_Living)
{
OCF|=OCF_Living;
if (Alive) OCF|=OCF_Alive;
}
// OCF_Alive
if (Alive) OCF|=OCF_Alive;
// OCF_Prey
if (Def->Prey)
if (Alive)
@ -871,7 +867,7 @@ void C4Object::UpdateOCF()
#endif
// Keep the bits that only have to be updated with SetOCF (def, category, con, alive, onfire)
OCF=OCF & (OCF_Normal | OCF_Exclusive | OCF_Edible | OCF_Grab | OCF_FullCon
| OCF_Rotate | OCF_OnFire | OCF_Inflammable | OCF_Living | OCF_Alive
| OCF_Rotate | OCF_OnFire | OCF_Inflammable | OCF_Alive
| OCF_Prey | OCF_CrewMember | OCF_AttractLightning);
// OCF_Carryable: Can be picked up
if (GetPropertyInt(P_Collectible))

View File

@ -6038,7 +6038,6 @@ C4ScriptConstDef C4ScriptConstMap[]=
{ "OCF_HitSpeed2" ,C4V_Int, OCF_HitSpeed2},
{ "OCF_HitSpeed3" ,C4V_Int, OCF_HitSpeed3},
{ "OCF_Collection" ,C4V_Int, OCF_Collection},
{ "OCF_Living" ,C4V_Int, OCF_Living},
{ "OCF_HitSpeed4" ,C4V_Int, OCF_HitSpeed4},
{ "OCF_Prey" ,C4V_Int, OCF_Prey},
{ "OCF_AttractLightning" ,C4V_Int, OCF_AttractLightning},

View File

@ -3057,9 +3057,7 @@ void C4AulParseState::Parse_Const()
if (TokenType != ATT_IDTF)
UnexpectedToken("constant name");
SCopy(Idtf, Name);
// check func lists - functions of same name are allowed for backwards compatibility
// (e.g., for overloading constants such as OCF_Living() in chaos scenarios)
// it is not encouraged though, so better warn
// check func lists - functions of same name are not allowed
if (a->Engine->GetFuncRecursive(Idtf))
Error("definition of constant hidden by function ", Idtf);
if (a->Engine->GlobalNamedNames.GetItemNr(Idtf) != -1)