forked from Mirrors/openclonk
removed some obsolete variables in C4Object once used by the engine-HUD
parent
db7486f494
commit
499582d543
|
@ -28,20 +28,15 @@
|
|||
const size_t C4MaxTitle = 512;
|
||||
const int
|
||||
C4MaxDefString = 100,
|
||||
C4MaxMessage = 256,
|
||||
|
||||
C4ViewDelay = 100,
|
||||
C4RetireDelay = 60,
|
||||
|
||||
C4MaxColor = 12,
|
||||
C4MaxKey = 12,
|
||||
C4MaxKeyboardSet = 4,
|
||||
C4MaxControlSet = C4MaxKeyboardSet+4, // keyboard sets+gamepads
|
||||
|
||||
C4MaxControlRate = 20,
|
||||
|
||||
C4MaxGammaUserRamps = 8,
|
||||
C4MaxGammaRamps = C4MaxGammaUserRamps+1;
|
||||
C4MaxMessage = 256,
|
||||
C4RetireDelay = 60,
|
||||
C4MaxColor = 12,
|
||||
C4MaxKey = 12,
|
||||
C4MaxKeyboardSet = 4,
|
||||
C4MaxControlSet = C4MaxKeyboardSet+4, // keyboard sets+gamepads
|
||||
C4MaxControlRate = 20,
|
||||
C4MaxGammaUserRamps = 8,
|
||||
C4MaxGammaRamps = C4MaxGammaUserRamps+1;
|
||||
|
||||
// gamma ramp indices
|
||||
#define C4GRI_SCENARIO 0
|
||||
|
|
|
@ -178,7 +178,6 @@ void C4Object::Default()
|
|||
FirePhase=0;
|
||||
InMat=MNone;
|
||||
Color=0;
|
||||
ViewEnergy=0;
|
||||
PlrViewRange=0;
|
||||
fix_x=fix_y=fix_r=0;
|
||||
xdir=ydir=rdir=0;
|
||||
|
@ -1075,7 +1074,6 @@ bool C4Object::ExecLife()
|
|||
// Reduce breath, then energy, bubble
|
||||
if (Breath > 0) DoBreath(-2);
|
||||
else DoEnergy(-1,false,C4FxCall_EngAsphyxiation, NO_OWNER);
|
||||
ViewEnergy = C4ViewDelay;
|
||||
// Physical training
|
||||
TrainPhysical(&C4PhysicalInfo::Breath, 2, C4MaxPhysical);
|
||||
}
|
||||
|
@ -1203,8 +1201,6 @@ void C4Object::Execute()
|
|||
}
|
||||
// Menu
|
||||
if (Menu) Menu->Execute();
|
||||
// View delays
|
||||
if (ViewEnergy>0) ViewEnergy--;
|
||||
}
|
||||
|
||||
bool C4Object::At(int32_t ctx, int32_t cty)
|
||||
|
@ -1420,8 +1416,6 @@ void C4Object::DoEnergy(int32_t iChange, bool fExact, int32_t iCause, int32_t iC
|
|||
Call(PSF_EnergyChange,&C4AulParSet(C4VInt(iChange), C4VInt(iCause), C4VInt(iCausedByPlr)));
|
||||
// Alive and energy reduced to zero: death
|
||||
if (Alive) if (Energy==0) if (!fWasZero) AssignDeath(false);
|
||||
// View change
|
||||
ViewEnergy = C4ViewDelay;
|
||||
}
|
||||
|
||||
void C4Object::UpdatLastEnergyLossCause(int32_t iNewCausePlr)
|
||||
|
@ -1444,8 +1438,6 @@ void C4Object::DoBreath(int32_t iChange)
|
|||
Breath += iChange;
|
||||
// call to object
|
||||
Call(PSF_BreathChange,&C4AulParSet(C4VInt(iChange)));
|
||||
// View change
|
||||
ViewEnergy = C4ViewDelay;
|
||||
}
|
||||
|
||||
void C4Object::Blast(int32_t iLevel, int32_t iCausedBy)
|
||||
|
|
|
@ -154,7 +154,6 @@ public:
|
|||
int32_t InMat; // SyncClearance-NoSave //
|
||||
uint32_t Color;
|
||||
int32_t Timer;
|
||||
int32_t ViewEnergy; // NoSave //
|
||||
int32_t Audible, AudiblePan; // NoSave //
|
||||
int32_t PlrViewRange;
|
||||
C4Real fix_x,fix_y,fix_r; // SyncClearance-Fix //
|
||||
|
|
|
@ -221,8 +221,6 @@ void C4Player::Execute()
|
|||
// Delays
|
||||
if (MessageStatus>0) MessageStatus--;
|
||||
if (RetireDelay>0) RetireDelay--;
|
||||
if (ViewWealth>0) ViewWealth--;
|
||||
if (ViewScore>0) ViewScore--;
|
||||
if (CursorFlash>0) CursorFlash--;
|
||||
}
|
||||
|
||||
|
@ -791,7 +789,6 @@ bool C4Player::SetWealth(int32_t iVal)
|
|||
if (iVal == Wealth) return true;
|
||||
|
||||
Wealth=BoundBy<int32_t>(iVal,0,10000);
|
||||
ViewWealth = C4ViewDelay;
|
||||
|
||||
Game.Script.GRBroadcast(PSF_OnWealthChanged,&C4AulParSet(C4VInt(Number)));
|
||||
|
||||
|
@ -1223,8 +1220,6 @@ void C4Player::CompileFunc(StdCompiler *pComp, bool fExact)
|
|||
pComp->Value(mkNamingAdapt(ZoomLimitMaxHgt, "ZoomLimitMaxHgt", 0));
|
||||
pComp->Value(mkNamingAdapt(ZoomWdt, "ZoomWdt", 0));
|
||||
pComp->Value(mkNamingAdapt(ZoomHgt, "ZoomHgt", 0));
|
||||
pComp->Value(mkNamingAdapt(ViewWealth, "ViewWealth", 0));
|
||||
pComp->Value(mkNamingAdapt(ViewScore, "ViewScore", 0));
|
||||
pComp->Value(mkNamingAdapt(fFogOfWar, "FogOfWar", false));
|
||||
bool bForceFogOfWar = false;
|
||||
pComp->Value(mkNamingAdapt(bForceFogOfWar, "ForceFogOfWar", false));
|
||||
|
@ -1356,7 +1351,6 @@ void C4Player::DefaultRuntimeData()
|
|||
ViewTarget=NULL;
|
||||
ShowStartup=true;
|
||||
CrewCnt=0;
|
||||
ViewWealth=ViewScore=0;
|
||||
Wealth=0;
|
||||
CurrentScore=InitialScore=0;
|
||||
ObjectsOwned=0;
|
||||
|
@ -1445,7 +1439,6 @@ void C4Player::NotifyOwnedObjects()
|
|||
bool C4Player::DoScore(int32_t iChange)
|
||||
{
|
||||
CurrentScore = BoundBy<int32_t>( CurrentScore+iChange, -100000, 100000 );
|
||||
ViewScore = C4ViewDelay;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,6 @@ public:
|
|||
C4Real ViewX,ViewY; // FIXED because this is saved/synchronized
|
||||
bool ViewLock; // if set, no scrolling is allowed
|
||||
C4Object *ViewTarget; // NoSave //
|
||||
int32_t ViewWealth,ViewScore;
|
||||
bool ShowStartup;
|
||||
int32_t FlashCom; // NoSave //
|
||||
bool fFogOfWar;
|
||||
|
|
|
@ -537,8 +537,6 @@ static bool FnDoMagicEnergy(C4AulObjectContext *cthr, long iChange, bool fAllowP
|
|||
cthr->Obj->MagicEnergy += iChange;
|
||||
// call to object
|
||||
cthr->Obj->Call(PSF_MagicEnergyChange,&C4AulParSet(C4VInt(iChange)));
|
||||
|
||||
cthr->Obj->ViewEnergy = C4ViewDelay;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -861,7 +861,6 @@ void C4Menu::DrawElement(C4TargetFacet &cgo)
|
|||
if (pDef) ::GraphicsResource.fctWealth.DrawValue(cgoExtra,iValue,0,0,C4FCT_Right);
|
||||
// Flag parent object's owner's wealth display
|
||||
C4Player *pParentPlr = ::Players.Get(GetControllingPlayer());
|
||||
if (pParentPlr) pParentPlr->ViewWealth = C4ViewDelay;
|
||||
}
|
||||
break;
|
||||
case C4MN_Extra_MagicValue:
|
||||
|
|
Loading…
Reference in New Issue