[Gcblue-commits] gcb_wx/include/sim tcSimState.h,1.25,1.26 tcWeaponObject.h,1.4,1.5
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-07-27 00:16:34
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10427/include/sim Modified Files: tcSimState.h tcWeaponObject.h Log Message: Index: tcWeaponObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcWeaponObject.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcWeaponObject.h 23 Jul 2004 00:45:46 -0000 1.4 --- tcWeaponObject.h 27 Jul 2004 00:16:23 -0000 1.5 *************** *** 31,35 **** namespace Database { ! class tcDatabaseObject; } --- 31,35 ---- namespace Database { ! class tcWeaponDBObject; } *************** *** 42,48 **** --- 42,57 ---- { public: + float GetDamage() const; + float GetDetonationDelay() const; + + /// returns intended target for weap or -1 if none exists + long GetIntendedTarget() const; + bool IsDetonated(); /// returns true if id is intended target of this weapon bool IsIntendedTarget(long id); + + void SetDetonationDelay(float delay_s); + /// sets intended target void SetIntendedTarget(long targetId); *************** *** 51,63 **** long intendedTarget; bool fuseHasTriggered; ///< set true when weapon detonates virtual tcUpdateStream& operator<<(tcUpdateStream& stream); virtual tcUpdateStream& operator>>(tcUpdateStream& stream); ! void Detonate(); tcWeaponObject(); tcWeaponObject(tcWeaponObject&); ! tcWeaponObject(tcDatabaseObject *obj); ~tcWeaponObject(); }; --- 60,79 ---- long intendedTarget; bool fuseHasTriggered; ///< set true when weapon detonates + tcWeaponDBObject* mpDBObject; + + /** + * Delay in seconds before detonation (allows some movement + * closer to target between time steps) + */ + float fuseDelay; virtual tcUpdateStream& operator<<(tcUpdateStream& stream); virtual tcUpdateStream& operator>>(tcUpdateStream& stream); ! void Detonate(float delay_s = 0); tcWeaponObject(); tcWeaponObject(tcWeaponObject&); ! tcWeaponObject(tcWeaponDBObject* obj); ~tcWeaponObject(); }; Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tcSimState.h 19 Jul 2004 00:52:27 -0000 1.25 --- tcSimState.h 27 Jul 2004 00:16:23 -0000 1.26 *************** *** 36,39 **** --- 36,40 ---- #include "tcCarrierObject.h" #include "tcAirObject.h" + #include "tcWeaponObject.h" #include "tcSound.h" #include "tcMapData.h" *************** *** 193,197 **** void EvaluateGuidedMissileHit(tcMissileObject* missile, tcGameObject* target); ! void EvaluateImpactMissileHit(tcMissileObject* missile); float GetFractionalDamage(float afDamage, tcGameObject *apGameObj); bool IsDetectedESM(tcESMSensor* apESM, const tcRadar* apEmitterRadar, float& rfAz_rad); --- 194,198 ---- void EvaluateGuidedMissileHit(tcMissileObject* missile, tcGameObject* target); ! void EvaluateImpactWeaponHit(tcWeaponObject* weapon); float GetFractionalDamage(float afDamage, tcGameObject *apGameObj); bool IsDetectedESM(tcESMSensor* apESM, const tcRadar* apEmitterRadar, float& rfAz_rad); |