sources » TemporalClass
/*
* TemporalClass is what handles the Temporal weapons which erase the target rather than injure it
* TechnoClass contains two pointers to TemporalClass:
* TemporalClass *TemporalImUsing; < the instance the unit uses to fire
* TemporalClass *TemporalTargetingMe; < the instance that's currently attacking the unit in question
*
*/
class TemporalClass : public AbstractClass {
TechnoClass *OwnerUnit; // The unit holding this class, like a Chrono Legionnaire
TechnoClass *Victim;
TimerStruct CreationTimer;
void *field_38; // no idea what this does, possibly unused
SuperClass *SourceSW; // never seen this used either
/*
* when multiple temporal nodes are attacking one unit,
* they are arranged in a double-linked list,
* and only the head node of the list actually deals damage,
* to do this, it needs to iterate over the whole linked list using these two
*/
TemporalClass *PrevTemporal;
TemporalClass *NextTemporal;
// How much "damage" this class still has to deal before the target is erased
int WarpRemaining;
int WarpPerStep;
// *********************
constructor TemporalClass(TechnoClass *OwnerUnit);
destructor ~TemporalClass(byte x);
/*
* Determines the amount of damage by frame
*/
int GetWarpPerStep(int helperCount);
/*
* Can the target be warped away at all?
*/
bool CanWarpTarget(TechnoClass *target);
/*
* Fires the beam and starts the warpaway
*/
void Fire(TechnoClass *target);
/*
* Called every frame to update the link's state
*/
void Update();
/*
* Breaks the link between firer and target
*/
void LetGo();
/*
* Breaks the link (bugfix in ::Fire and for housewide destruction only)
*/
void Detach();
/*
* special variant used only when house-wide destruction is forced by Actions
* such as Destroy All (Objects/Buildings/etc) of House
*/
void JustLetGo();
}