#include <eGameObject.h>
Public Member Functions | |
eTeam * | Team () const |
eGrid * | Grid () const |
eFace * | CurrentFace () const |
virtual void | AddRef ()=0 |
adds a reference | |
virtual void | Release ()=0 |
removes a reference | |
void | AddToList () |
void | RemoveFromList () |
void | RemoveFromListsAll () |
void | RemoveFromGame () |
removes the object physically from the game | |
int | GOID () const |
REAL | LastTime () const |
virtual REAL | NextInterestingTime () const |
the next time something interesting is going to happen with this object | |
eGameObject (eGrid *grid, const eCoord &p, const eCoord &d, eFace *currentface, bool autodelete=1) | |
virtual | ~eGameObject () |
virtual eCoord | Position () const |
virtual eCoord | Direction () const |
virtual eCoord | LastDirection () const |
virtual REAL | DeathTime () const |
virtual REAL | Speed () const |
virtual eCoord | PredictPosition () const |
virtual void | InteractWith (eGameObject *target, REAL time, int recursion=1) |
virtual void | PassEdge (const eWall *w, REAL time, REAL a, int recursion=1) |
virtual REAL | PathfindingModifier (const eWall *w) const |
void | Move (const eCoord &dest, REAL startTime, REAL endTime, bool useTempWalls=true) |
void | FindCurrentFace () |
virtual bool | Timestep (REAL currentTime) |
virtual bool | EdgeIsDangerous (const eWall *w, REAL time, REAL a) const |
virtual void | OnRoundBegin () |
virtual void | OnRoundEnd () |
called when the round ends | |
virtual void | Kill () |
destroys the gameobject (in the game) | |
virtual bool | Alive () const |
tells whether the object is alive | |
virtual void | Render (const eCamera *cam) |
draws object to the screen using OpenGL | |
virtual void | Render2D (tCoord scale) const |
virtual bool | RendersAlpha () const |
returns whether the rendering uses alpha blending (massively, so sorting errors would show) | |
virtual bool | RenderCockpitFixedBefore (bool primary=true) |
virtual void | RenderCockpitFixedAfter (bool primary=true) |
virtual void | RenderCockpitVirtual (bool primary=false) |
virtual eCoord | CamDir () const |
virtual REAL | CamRise () const |
virtual eCoord | CamPos () const |
virtual REAL | CamZ () const |
virtual eCoord | CamTop () const |
virtual REAL | Lag () const |
expected average network latency | |
virtual REAL | LagThreshold () const |
tolerated network latency variation | |
virtual bool | Act (uActionPlayer *Act, REAL x) |
Static Public Member Functions | |
static REAL | GetMaxLazyLag () |
tells game objects what the maximum lag caused by lazy simulation of timesteps is | |
static void | SetMaxLazyLag (REAL lag) |
sets the value reported by GetMaxLazyLag() | |
static void | s_Timestep (eGrid *grid, REAL currentTime, REAL minTimestep) |
static void | RenderAll (eGrid *grid, const eCamera *cam) |
static void | PPDisplayAll () |
static void | DeleteAll (eGrid *grid) |
Static Public Attributes | |
static uActionPlayer | se_turnLeft |
static uActionPlayer | se_turnRight |
Protected Member Functions | |
tCHECKED_PTR (eGrid) grid | |
virtual void | OnRemoveFromGame () |
called on RemoveFromGame(). Call base class implementation, too, in your implementation. Must keep the object alive. | |
Static Protected Member Functions | |
static bool | TimestepThis (REAL currentTime, eGameObject *t) |
static REAL | MaxSimulateAhead () |
Protected Attributes | |
int | interestingID |
int | inactiveID |
bool | autodelete |
REAL | lastTime |
REAL | deathTime |
eCoord | pos |
eCoord | dir |
REAL | z |
tJUST_CONTROLLED_PTR< eTeam > | team |
tJUST_CONTROLLED_PTR< eFace > | currentFace |
Private Member Functions | |
virtual void | DoRemoveFromGame () |
called on RemoveFromGame() after OnRemoveFromGame(). Do not call base class implementation of this function, don't expect to get called from subclasses. | |
Static Private Member Functions | |
static void | TimestepThisWrapper (eGrid *grid, REAL currentTime, eGameObject *t, REAL minTimestep) |
Private Attributes | |
int | id |
Friends | |
class | eFace |
class | eCamera |
class | eSensor |
class | eGrid |
class | ePlayerNetID |
Definition at line 45 of file eGameObject.h.
eGameObject::eGameObject | ( | eGrid * | grid, | |
const eCoord & | p, | |||
const eCoord & | d, | |||
eFace * | currentface, | |||
bool | autodelete = 1 | |||
) |
Definition at line 117 of file eGameObject.cpp.
References currentFace, inactiveID, interestingID, lastTime, se_GameTime(), tASSERT, and team.
00118 :autodelete(autodel),pos(p),dir(d),z(0),grid(g){ 00119 tASSERT(g); 00120 currentFace=currentface; 00121 lastTime=se_GameTime(); 00122 id=-1; 00123 interestingID=-1; 00124 inactiveID=-1; 00125 if ( lastTime < 0 ) 00126 lastTime=0; 00127 team = 0; 00128 }
eGameObject::~eGameObject | ( | ) | [virtual] |
Definition at line 130 of file eGameObject.cpp.
References currentFace, RemoveFromListsAll(), and tCHECK_DEST.
00130 { 00131 currentFace = 0; 00132 RemoveFromListsAll(); 00133 tCHECK_DEST; 00134 }
void eGameObject::TimestepThisWrapper | ( | eGrid * | grid, | |
REAL | currentTime, | |||
eGameObject * | t, | |||
REAL | minTimestep | |||
) | [static, private] |
Definition at line 758 of file eGameObject.cpp.
References autodelete, currentFace, eWallRim::IsBound(), Kill(), Lag(), LagThreshold(), lastTime, LastTime(), nCLIENT, NextInterestingTime(), NULL, pos, REAL, RemoveFromGame(), RemoveFromList(), sn_GetNetState(), sr_predictObjects, su_FetchAndStoreSDLInput(), and TimestepThis().
Referenced by s_Timestep().
00759 { 00760 su_FetchAndStoreSDLInput(); 00761 00762 REAL simTime=currentTime; 00763 // backdate the object a bit 00764 #ifndef DEDICATED 00765 if (sn_GetNetState()==nCLIENT && !sr_predictObjects) 00766 #endif 00767 simTime -= c->Lag(); 00768 00769 #ifdef DEDICATED 00770 REAL nextTime = c->NextInterestingTime(); 00771 00772 // store the time left to simulate 00773 se_maxSimulateAheadLeft = simTime + se_maxSimulateAhead - nextTime; 00774 if ( se_maxSimulateAheadLeft < 0 ) 00775 se_maxSimulateAheadLeft = 0; 00776 00777 REAL lagThreshold = c->LagThreshold(); 00778 if ( simTime - lagThreshold < nextTime && nextTime < simTime + se_maxSimulateAhead ) 00779 { 00780 // something interesting is going to happen, see what it is 00781 simTime = nextTime; 00782 } 00783 else 00784 { 00785 // add an extra portion of lag compensation 00786 simTime -= lagThreshold; 00787 00788 if ( simTime < c->LastTime() + minTimestep ) 00789 { 00790 // don't waste your time on too small timesteps 00791 return; 00792 } 00793 } 00794 #endif 00795 00796 // check for teleports out of arena bounds 00797 if (!eWallRim::IsBound(c->pos,-20)) 00798 { 00799 se_maxSimulateAheadLeft = 0; 00800 00801 c->Kill(); 00802 return; 00803 } 00804 00805 // only simulate forward here 00806 if ( simTime > c->lastTime ) 00807 { 00808 if (TimestepThis(simTime,c)) 00809 { 00810 if (c->autodelete) 00811 c->RemoveFromGame(); 00812 else 00813 { 00814 c->currentFace=NULL; 00815 c->RemoveFromList(); 00816 } 00817 } 00818 } 00819 00820 se_maxSimulateAheadLeft = 0.0; 00821 }
bool eGameObject::TimestepThis | ( | REAL | currentTime, | |
eGameObject * | t | |||
) | [static, protected] |
Definition at line 680 of file eGameObject.cpp.
References FindCurrentFace(), InteractWith(), lastTime, nCLIENT, REAL, sn_GetNetState(), and Timestep().
Referenced by gCycleMovement::CopyFrom(), gCycle::Extrapolate(), gCycle::ReceiveControl(), gCycle::SyncEnemy(), and TimestepThisWrapper().
00680 { 00681 #ifdef DEBUG 00682 c->grid->Check(); 00683 #endif 00684 00685 tJUST_CONTROLLED_PTR< eGameObject > keep( c ); // keep object alive 00686 00687 REAL maxstep=.2; 00688 00689 // don't do a thing if the timestep is too small 00690 if (fabs(currentTime - c->lastTime) < .001) 00691 return false; 00692 00693 // be more careful when going back 00694 if (currentTime<c->lastTime) 00695 maxstep=.1; 00696 00697 int number_of_steps=int(fabs((currentTime-c->lastTime)/maxstep)); 00698 if (number_of_steps<1) 00699 number_of_steps=1; 00700 if ( number_of_steps > 10 ) 00701 { 00702 number_of_steps = 10; 00703 } 00704 00705 REAL lastTime=c->lastTime; 00706 00707 bool ret=false; 00708 00709 for(int i=1;i<=number_of_steps;i++) 00710 { 00711 // make current face valid 00712 c->FindCurrentFace(); 00713 00714 if (sn_GetNetState()!=nCLIENT) 00715 for(int j=c->grid->gameObjectsInteresting.Len()-1;j>=0;j--) 00716 c->InteractWith(c->grid->gameObjectsInteresting(j),currentTime,0); 00717 00718 REAL timeThisStep = lastTime+i*(currentTime-lastTime)/number_of_steps; 00719 ret = ret || c->Timestep(timeThisStep); 00720 c->FindCurrentFace(); 00721 00722 // see if the object refused to get simulated, if yes, give up 00723 if ( 2 * c->lastTime < timeThisStep + lastTime ) 00724 break; 00725 } 00726 #ifdef DEBUG 00727 c->grid->Check(); 00728 #endif 00729 00730 return ret; 00731 }
REAL eGameObject::MaxSimulateAhead | ( | ) | [static, protected] |
Definition at line 740 of file eGameObject.cpp.
Referenced by gCycle::PreparePredictPosition(), and gCycleMovement::Timestep().
00741 { 00742 return se_maxSimulateAheadLeft; 00743 }
eGameObject::tCHECKED_PTR | ( | eGrid | ) | [protected] |
REAL eGameObject::GetMaxLazyLag | ( | ) | [static] |
tells game objects what the maximum lag caused by lazy simulation of timesteps is
Definition at line 747 of file eGameObject.cpp.
Referenced by _wrap_EGameObject_get_max_lazy_lag(), gCycle::PassEdge(), and gCycle::PreparePredictPosition().
00748 { 00749 return se_lazyLag; 00750 }
void eGameObject::SetMaxLazyLag | ( | REAL | lag | ) | [static] |
sets the value reported by GetMaxLazyLag()
lag | the maximum extra simulation time difference, on top of regular lag, caused by lazy simulation |
Definition at line 753 of file eGameObject.cpp.
Referenced by _wrap_EGameObject_set_max_lazy_lag(), and s_Timestep().
00754 { 00755 se_lazyLag = lag; 00756 }
eTeam* eGameObject::Team | ( | ) | const [inline] |
Definition at line 99 of file eGameObject.h.
References team.
Referenced by gBaseZoneHack::CountZonesOfTeam(), gAIPlayer::CycleBlocksWay(), gCycle::EdgeIsDangerous(), gAIPlayer::EmergencySurvive(), gAISensor::gAISensor(), gSensor::PassEdge(), gAIPlayer::ThinkSurvive(), and gAIPlayer::ThinkTrace().
00099 { return team; }
eGrid* eGameObject::Grid | ( | ) | const [inline] |
Definition at line 103 of file eGameObject.h.
Referenced by CheckLoop(), gBaseZoneHack::CheckSurvivor(), gCycleMovement::CopyFrom(), gCycleMovement::DistanceToDestination(), gCycleMovement::DoTurn(), gAIPlayer::EmergencySurvive(), eHalfEdge::FindPath(), gCycle::gCycle(), gCycleMovement::gCycleMovement(), gCycleMovement::GetMaxSpaceAhead(), gCycle::ReadSync(), gCycleMovement::SetWindingNumberWrapped(), gAIPlayer::Think(), gAIPlayer::ThinkSurvive(), gAIPlayer::ThinkTrace(), gBaseZoneHack::Timestep(), gCycleMovement::Timestep(), and gJoystick::Turn().
eFace* eGameObject::CurrentFace | ( | ) | const [inline] |
Definition at line 104 of file eGameObject.h.
References currentFace.
Referenced by gCycle::DropWall().
00104 { return currentFace; }
virtual void eGameObject::AddRef | ( | ) | [pure virtual] |
adds a reference
Implemented in eReferencableGameObject, eStackGameObject, eNetGameObject, and gCycleMovement.
Referenced by AddToList().
virtual void eGameObject::Release | ( | ) | [pure virtual] |
removes a reference
Implemented in eReferencableGameObject, eStackGameObject, and eNetGameObject.
Referenced by RemoveFromList(), and RemoveFromListsAll().
void eGameObject::AddToList | ( | ) |
Definition at line 54 of file eGameObject.cpp.
References AddRef(), and inactiveID.
Referenced by gCycleWallRenderer::gCycleWallRenderer(), gExplosion::gExplosion(), gSpark::gSpark(), gZone::gZone(), gCycle::MyInitAfterCreation(), zMonitor::zMonitor(), and zZone::zZone().
00054 { 00055 if ( id < 0 ) 00056 AddRef(); 00057 00058 grid->gameObjectsInactive.Remove(this,inactiveID); 00059 grid->gameObjects.Add(this,id); 00060 }
void eGameObject::RemoveFromList | ( | ) |
Definition at line 61 of file eGameObject.cpp.
References currentFace, id, inactiveID, and Release().
Referenced by gCycleExtrapolator::gCycleExtrapolator(), and TimestepThisWrapper().
00061 { 00062 int oldID = id; 00063 00064 currentFace = 0; 00065 00066 grid->gameObjects.Remove(this,id); 00067 grid->gameObjectsInactive.Add(this,inactiveID); 00068 00069 if ( oldID >= 0 ) 00070 Release(); 00071 }
void eGameObject::RemoveFromListsAll | ( | ) |
Definition at line 73 of file eGameObject.cpp.
References currentFace, id, inactiveID, interestingID, and Release().
Referenced by OnRemoveFromGame(), zMonitor::RemoveFromGame(), and ~eGameObject().
00073 { 00074 int oldID = id; 00075 00076 currentFace = 0; 00077 00078 grid->gameObjects.Remove(this,id); 00079 grid->gameObjectsInactive.Remove(this,inactiveID); 00080 grid->gameObjectsInteresting.Remove(this,interestingID); 00081 00082 if ( oldID >= 0 ) 00083 Release(); 00084 00085 }
void eGameObject::RemoveFromGame | ( | void | ) |
removes the object physically from the game
Reimplemented in zMonitor, and zZone.
Definition at line 87 of file eGameObject.cpp.
References DoRemoveFromGame(), and OnRemoveFromGame().
Referenced by eNetGameObject::ActionOnDelete(), DeleteAll(), zZone::RemoveFromGame(), TimestepThisWrapper(), and gCycle::~gCycle().
00088 { 00089 tJUST_CONTROLLED_PTR< eGameObject > keepAlive; 00090 if ( id >= 0 ) 00091 keepAlive = this; 00092 00093 OnRemoveFromGame(); 00094 DoRemoveFromGame(); 00095 }
void eGameObject::OnRemoveFromGame | ( | ) | [protected, virtual] |
called on RemoveFromGame(). Call base class implementation, too, in your implementation. Must keep the object alive.
Reimplemented in gCycle, gCycleMovement, and gExplosion.
Definition at line 99 of file eGameObject.cpp.
References currentFace, and RemoveFromListsAll().
Referenced by gExplosion::OnRemoveFromGame(), gCycleMovement::OnRemoveFromGame(), and RemoveFromGame().
00100 { 00101 // remove from grid 00102 currentFace = 0; 00103 00104 // remove from lists 00105 RemoveFromListsAll(); 00106 }
void eGameObject::DoRemoveFromGame | ( | ) | [private, virtual] |
called on RemoveFromGame() after OnRemoveFromGame(). Do not call base class implementation of this function, don't expect to get called from subclasses.
Reimplemented in eReferencableGameObject, eStackGameObject, and eNetGameObject.
Definition at line 110 of file eGameObject.cpp.
Referenced by RemoveFromGame().
int eGameObject::GOID | ( | ) | const [inline] |
Definition at line 120 of file eGameObject.h.
References id.
Referenced by FindCurrentFace(), gCycle::Kill(), and gCycle::ReadSync().
00120 {return id;}
REAL eGameObject::LastTime | ( | ) | const [inline] |
Definition at line 121 of file eGameObject.h.
References lastTime.
Referenced by gEnemyInfluence::AddWall(), CanPass(), gCycleMovement::CopyFrom(), gDestination::CopyFrom(), gCycleMovement::GetMaxSpaceAhead(), gCycle::KillAt(), gCycleMovement::NextInterestingTime(), gCycle::PassEdge(), gCycle::SyncFromExtrapolator(), and TimestepThisWrapper().
00121 {return lastTime;}
virtual REAL eGameObject::NextInterestingTime | ( | void | ) | const [inline, virtual] |
the next time something interesting is going to happen with this object
Reimplemented in gCycleMovement.
Definition at line 122 of file eGameObject.h.
References lastTime.
Referenced by TimestepThisWrapper().
virtual eCoord eGameObject::Position | ( | ) | const [inline, virtual] |
Definition at line 127 of file eGameObject.h.
References pos.
Referenced by _wrap_EGameObject_position(), cCockpit::cb_CurrentPosX(), cCockpit::cb_CurrentPosY(), cCockpit::cb_TimeToImpactFront(), gCycleMovement::CopyFrom(), gDestination::CopyFrom(), gCycleMovement::DoTurn(), gCycle::DoTurn(), cWidget::Map::DrawMap(), gAIPlayer::EmergencySurvive(), gCycleMovement::GetMaxSpaceAhead(), gSpark::gSpark(), gZone::InteractWith(), zShapePolygon::isInteracting(), zShapeCircle::isInteracting(), se_SanifyDisplacement(), sg_GetSensor(), sg_RespawnPlayer(), gAIPlayer::Think(), gAIPlayer::ThinkCloseCombat(), gAIPlayer::ThinkPath(), gAIPlayer::ThinkSurvive(), gAIPlayer::ThinkTrace(), gBaseZoneHack::Timestep(), eChannel::Update(), gCycle::WriteSync(), and eNetGameObject::WriteSync().
00127 {return pos;}
virtual eCoord eGameObject::Direction | ( | void | ) | const [inline, virtual] |
Reimplemented in gCycle, and gCycleMovement.
Definition at line 128 of file eGameObject.h.
References dir.
Referenced by _wrap_EGameObject_direction(), gCycleChatBot::Activate(), eCamera::CenterDir(), gCycleChatBot::Distance(), FindCurrentFace(), sg_RespawnPlayer(), eCamera::Timestep(), eChannel::Update(), and eNetGameObject::WriteSync().
00128 {return dir;}
virtual eCoord eGameObject::LastDirection | ( | void | ) | const [inline, virtual] |
Reimplemented in gCycleMovement.
Definition at line 129 of file eGameObject.h.
References dir.
Referenced by _wrap_EGameObject_last_direction(), FindCurrentFace(), and eCamera::Timestep().
00129 {return dir;}
virtual REAL eGameObject::DeathTime | ( | ) | const [inline, virtual] |
Definition at line 130 of file eGameObject.h.
References deathTime.
Referenced by gGame::Analysis(), gCycleWallsDisplayListManager::CannotHaveList(), cWidget::Map::DrawWalls(), and gCycle::Render2D().
00130 {return deathTime;}
virtual REAL eGameObject::Speed | ( | void | ) | const [inline, virtual] |
Reimplemented in gCycleMovement.
Definition at line 131 of file eGameObject.h.
Referenced by eCamera::CenterSpeed(), eCamera::MyInit(), and eCamera::Timestep().
virtual eCoord eGameObject::PredictPosition | ( | ) | const [inline, virtual] |
Reimplemented in gCycle.
Definition at line 134 of file eGameObject.h.
References pos.
Referenced by eCamera::MyInit(), and eCamera::Timestep().
00134 {return pos;}
void eGameObject::InteractWith | ( | eGameObject * | target, | |
REAL | time, | |||
int | recursion = 1 | |||
) | [virtual] |
Reimplemented in gCycle, gExplosion, gSpark, gZone, and zZone.
Definition at line 141 of file eGameObject.cpp.
Referenced by TimestepThis().
Reimplemented in eCameraSensor, eSensor, gCycleChatBot::Sensor, gCycleExtrapolator, gCycle, gExplosion, gSensor, and gSpark.
Definition at line 144 of file eGameObject.cpp.
References Kill().
Referenced by Move().
00144 { 00145 if (w) Kill(); 00146 }
Reimplemented in gCycle.
Definition at line 143 of file eGameObject.h.
Referenced by Modifier().
void eGameObject::Move | ( | const eCoord & | dest, | |
REAL | startTime, | |||
REAL | endTime, | |||
bool | useTempWalls = true | |||
) |
sg_netPlayerWalls(i)->Preliminary() &&
Definition at line 161 of file eGameObject.cpp.
References eWallRim::Bound(), eWallRim::Clip(), currentFace, eCoord, EPS, FindCurrentFace(), eWallHolder::GetWall(), good(), in, eHalfEdge::IntersectWith(), eHalfEdge::IntersectWithCareless(), lastTime, eHalfEdge::Next(), NULL, eHalfEdge::Other(), PassEdge(), eHalfEdge::Point(), pos, eTempEdgePassing::ratio, eHalfEdge::Ratio(), REAL, score, se_EstimatedRangeOfMult(), se_moveTimeout, st_Breakpoint(), tASSERT, TIME, eHalfEdge::Vec(), and eTempEdgePassing::wall.
Referenced by eSensor::detect(), FindCurrentFace(), gCycleMovement::MoveSafely(), gZone::Timestep(), gCycleWallRenderer::Timestep(), and gCycleMovement::TimestepCore().
00162 { 00163 #ifdef DEBUG 00164 grid->Check(); 00165 #endif 00166 if (!finite(dest.x) || !finite(dest.y)) 00167 { 00168 st_Breakpoint(); 00169 return; 00170 } 00171 00172 tStackObject< ePoint > start(pos),stop(dest); 00173 ePoint* pstart = &start; 00174 ePoint* pstop = &stop; 00175 00176 // clip movement to rim walls 00177 REAL clip = eWallRim::Clip(start,stop,-10); 00178 endTime = startTime + ( endTime - startTime ) * clip; 00179 00180 grid->Range(stop.NormSquared()); 00181 00182 #ifdef DEBUG 00183 if (!finite(stop.x) || !finite(stop.y)) 00184 { 00185 st_Breakpoint(); 00186 00187 static_cast<eCoord&>(stop) = dest; 00188 eWallRim::Bound(stop,-10); 00189 00190 return; 00191 } 00192 #endif 00193 00194 // se_GridRange(dest.Norm_squared()); 00195 eTempEdgeMap tempCollisions; 00196 00197 tStackObject< eTempEdge > te( pstart, pstop ); 00198 eHalfEdge &e=*te.Edge(0); 00199 00200 // check all the currently drawn eWalls: 00201 if ( useTempWalls ) 00202 { 00203 for(int i=grid->wallsNotYetInserted.Len()-1;i>=0;i--){ 00204 const eHalfEdge *other_e=grid->wallsNotYetInserted[i]->Edge(); 00205 if ( 00206 other_e->Point() && other_e->Other() && other_e->Other()->Point()){ 00207 tJUST_CONTROLLED_PTR< ePoint > new_cross_p=e.IntersectWith(other_e); 00208 if (new_cross_p){ 00209 REAL e_ratio =e.Ratio(*new_cross_p); 00210 REAL o_ratio =other_e->Ratio(*new_cross_p); 00211 if (0<=e_ratio && 1>=e_ratio && 00212 0<=o_ratio && 1>=o_ratio) 00213 { // find the fall 00214 eWall *w = other_e->GetWall(); 00215 if (!w) 00216 { 00217 w = other_e->Other()->GetWall(); 00218 o_ratio = 1-o_ratio; 00219 } 00220 if (w) 00221 { 00222 // insert data into map structure for later processing 00223 eTempEdgePassing passing; 00224 passing.wall = w; 00225 passing.ratio = o_ratio; 00226 tempCollisions.insert( std::pair< REAL, eTempEdgePassing >( e_ratio, passing) ); 00227 } 00228 } 00229 } 00230 } 00231 } 00232 } 00233 00234 // find a replacement face if required 00235 FindCurrentFace(); 00236 00237 // the total distance to travel 00238 REAL totalDistance = ( stop - pos ).Norm(); 00239 00240 if (currentFace){ 00241 // start iterator for collisions with temporary walls 00242 eTempEdgeMap::const_iterator currentTempCollision = tempCollisions.begin(); 00243 00244 // we modify our position while we go; we need to compensate 00245 // all time calculations for that. This variable stores how much 00246 // of the way to the target position we're already gone. 00247 REAL goneRatio = 0; 00248 00249 int timeout = se_moveTimeout; 00250 00251 REAL lastDistance = 1E+30; // the distance of pos and stop in the last step 00252 eHalfEdge *in = NULL; // incoming edge to prevent entdless loop 00253 00254 while (currentFace && timeout >0 && !currentFace->IsInside(stop)){ 00255 // the vector to our destination: 00256 eCoord vec=stop - pos; 00257 00258 // count down timeout if we're moving into the wrong direction 00259 REAL distance = vec.Norm(); 00260 if ( distance >= lastDistance ) 00261 { 00262 timeout--; 00263 } 00264 else 00265 { 00266 timeout = se_moveTimeout; 00267 if ( lastDistance > 1E+29 ) 00268 lastDistance = distance * 1.1; 00269 lastDistance = .1 * lastDistance + distance * (.9 - EPS); 00270 00271 // check if the target has been reached within tolerance; it can only make matters 00272 // worse then to continue, even if the current face claims we're not part of it. 00273 if ( distance <= EPS * totalDistance ) 00274 { 00275 // st_Breakpoint(); 00276 break; 00277 } 00278 } 00279 #ifdef DEBUG_X 00280 rerun: 00281 #endif 00282 00283 eHalfEdge *run = currentFace->Edge(); // runs through all edges of the face 00284 eHalfEdge *best = NULL; // the best face to leave 00285 eHalfEdge *end = run; 00286 REAL bestScore = -1000; 00287 REAL bestERatio = .5; 00288 REAL bestRRatio = .5; 00289 eCoord bestCross (0,0); 00290 00291 // look for the best way out 00292 do 00293 { 00294 run = run->Next(); 00295 00296 if (run == in) // never leave through the edge we entered 00297 continue; 00298 00299 eCoord runVec = run->Vec(); 00300 00301 REAL score = runVec * vec / ( se_EstimatedRangeOfMult( runVec, vec ) + EPS ); 00302 static const REAL smallBias = .01; 00303 00304 // keep a bit of the score, but not too much. We want to 00305 // sort out exactly parallel walls here. 00306 if ( score > smallBias || ( score > 0 && !run->GetWall() ) ) 00307 score = smallBias; 00308 00309 eCoord cross = e.IntersectWithCareless(run); 00310 00311 // project crossing to face edge without score penalty 00312 REAL run_ratio = run->Ratio(cross); 00313 if ( !good( run_ratio ) ) 00314 { 00315 // score -= 100; 00316 run_ratio = .5; 00317 } 00318 00319 if (run_ratio < 0) 00320 { 00321 // score += run_ratio; 00322 run_ratio = 0; 00323 } 00324 else if (run_ratio > 1) 00325 { 00326 // score += (1-run_ratio); 00327 run_ratio = 1; 00328 } 00329 cross = *run->Point() + run->Vec() * run_ratio; 00330 00331 // determine how far off the movement edge the modified intersection lies 00332 REAL e_side = vec * ( cross - pos ) / distance; 00333 score -= fabs( e_side ); 00334 // REAL run_side = runVec * ( cross - *run->Point() ) / runVec.NormSquared(); 00335 00336 REAL e_ratio = e.Ratio(cross); 00337 00338 // see whether the intersection is beyond the end points of the movement vector 00339 if ( !good( e_ratio ) ) 00340 { 00341 score -= 100; 00342 e_ratio = .5; 00343 } 00344 00345 if (e_ratio < 0) 00346 { 00347 score += e_ratio; 00348 e_ratio = 0; 00349 } 00350 else if (e_ratio > 1) 00351 { 00352 score += (1-e_ratio); 00353 e_ratio = 1; 00354 } 00355 00356 if (!best || score > bestScore) 00357 { 00358 best = run; 00359 bestScore = score; 00360 bestERatio = e_ratio; 00361 bestRRatio = run_ratio; 00362 bestCross = cross; 00363 } 00364 00365 } 00366 while (run != end); 00367 00368 #ifdef DEBUG_X 00369 if ( !good( bestScore ) || bestScore < -50 ) 00370 { 00371 st_Breakpoint(); 00372 goto rerun; 00373 } 00374 #endif 00375 00376 #define TIME( ratio ) ( startTime+(endTime-startTime)*( ratio ) ) 00377 00378 if (best) 00379 { 00380 // update the fraction of the full way we've gone so far 00381 goneRatio = goneRatio + ( 1 - goneRatio ) * bestERatio; 00382 00383 // handle stored temp collisions 00384 while ( currentTempCollision != tempCollisions.end() && (*currentTempCollision).first < goneRatio ) 00385 { 00386 eTempEdgePassing const & passing = (*currentTempCollision).second; 00387 PassEdge( passing.wall, TIME( (*currentTempCollision).first ), passing.ratio, 0 ); 00388 ++ currentTempCollision; 00389 } 00390 00391 REAL time=TIME( bestERatio ); 00392 00393 // move to the collision point 00394 pos = bestCross; 00395 00396 // leave this face (through a wall) 00397 eWall* w = best->GetWall(); 00398 if (w) 00399 PassEdge(w,time,bestRRatio,0); 00400 00401 // set next incoming edge 00402 tASSERT(best->Other()); 00403 in = best->Other(); 00404 00405 // enter the next face (through a wall) 00406 if (in) 00407 { 00408 bestRRatio = 1-bestRRatio; 00409 w = in->GetWall(); 00410 00411 if (w) 00412 PassEdge(w,time,bestRRatio,0); 00413 } 00414 00415 // switch to the next face 00416 if (in) 00417 currentFace=in->Face(); 00418 else 00419 currentFace=NULL; 00420 } 00421 else 00422 { 00423 timeout = 0; 00424 st_Breakpoint(); 00425 } 00426 } 00427 00428 if (timeout <= 0) 00429 grid->requestCleanup = true; 00430 else 00431 pos=stop; 00432 00433 // handle stored temp collisions 00434 while ( currentTempCollision != tempCollisions.end() ) 00435 { 00436 eTempEdgePassing const & passing = (*currentTempCollision).second; 00437 PassEdge( passing.wall, TIME( (*currentTempCollision).first ), passing.ratio, 0 ); 00438 ++ currentTempCollision; 00439 } 00440 } 00441 else // !currentFace 00442 { 00443 // just move. 00444 pos = dest; 00445 } 00446 00447 // not if the movement timed out 00448 // pos=stop; 00449 00450 // find a replacement face if required 00451 FindCurrentFace(); 00452 00453 //#ifdef DEBUG 00454 //se_CheckGrid(); 00455 //#endif 00456 00457 //if (id<0) 00458 // currentFace = NULL; 00459 00460 lastTime = endTime; 00461 }
void eGameObject::FindCurrentFace | ( | ) |
Definition at line 476 of file eGameObject.cpp.
References con, currentFace, Direction(), eCoord, filter(), GOID(), LastDirection(), lastTime, Move(), nCLIENT, eHalfEdge::Next(), NULL, eHalfEdge::Point(), pos, REAL, se_bugTunnel, sn_GetNetState(), st_Breakpoint(), tERR_WARN, and eHalfEdge::Vec().
Referenced by gCycleMovement::DoTurn(), gCycle::DoTurn(), gCycle::DropWall(), Move(), gCycle::ReadSync(), gAIPlayer::ThinkPath(), and TimestepThis().
00476 { 00477 // find a replacement for a removed face 00478 if ( currentFace && !currentFace->IsInGrid() ) 00479 { 00480 if ( !se_bugTunnel ) 00481 { 00482 currentFace = currentFace->FindReplacement( pos, Direction(), LastDirection() ); 00483 if ( !currentFace && sn_GetNetState() != nCLIENT ) 00484 { 00485 static bool warn = true; 00486 if (warn) 00487 { 00488 tERR_WARN("Possible phase bug!\n"); 00489 } 00490 00491 warn = false; 00492 } 00493 } 00494 else 00495 { 00496 // allow tunneling through walls 00497 currentFace = NULL; 00498 } 00499 } 00500 00501 // don't fetch a new current face if you're out of the game 00502 if ( !currentFace && GOID() < 0 ) 00503 { 00504 #ifdef DEBUG 00505 con << "Attempting to get a current face, but object is not in game.\n"; 00506 st_Breakpoint(); 00507 return; 00508 #endif 00509 } 00510 00511 // did that do the trick? If no, use brute force. 00512 if ( !currentFace ) 00513 currentFace = grid->FindSurroundingFace(pos); 00514 00515 if ( currentFace ) 00516 { 00517 // check if the position lies inside the current triangle 00518 REAL insideness = currentFace->Insideness(pos); 00519 if ( insideness < 0 ) 00520 { 00521 eFaceFindFilter filter; 00522 // if ( sn_GetNetState() != nCLIENT ) 00523 // con << "insideness = " << insideness << "\n"; 00524 00525 // no. Find the center of the current face. 00526 int i; 00527 eCoord center; 00528 eHalfEdge * run = currentFace->Edge(); 00529 for ( i = 2; i >= 0; --i ) 00530 { 00531 run = run->Next(); 00532 center = center + ( *run->Point() - pos ); 00533 } 00534 eCoord centerToPos = -center*(1/3.0); 00535 center = pos - centerToPos; 00536 00537 static bool recurse = true; 00538 if ( recurse ) 00539 { 00540 class RecursionGuard 00541 { 00542 public: 00543 RecursionGuard( bool& recursion ) 00544 :recursion_( recursion ) 00545 { 00546 recursion = false; 00547 } 00548 00549 ~RecursionGuard() 00550 { 00551 recursion_ = true; 00552 } 00553 00554 private: 00555 bool& recursion_; 00556 }; 00557 00558 RecursionGuard guard( recurse ); 00559 00560 // warp to the known good position and move back to where the 00561 // object should be 00562 eCoord oldPos = pos; 00563 pos = center; 00564 #ifdef DEBUG 00565 eFace * lastFace = currentFace; 00566 #endif 00567 try 00568 { 00569 Move( oldPos, lastTime, lastTime, false ); 00570 } 00571 catch( eDeath & ) // ignore death exceptions and leave object where it would have died 00572 { 00573 #ifdef DEBUG 00574 // try again (yeah, this looks like a WTF, but it really helps in some cases because the situation has changed since the last try. /me blames floating points) 00575 try 00576 { 00577 pos = center; 00578 currentFace = lastFace; 00579 Move( oldPos, lastTime, lastTime, false ); 00580 } 00581 catch( eDeath & ){} 00582 #endif 00583 } 00584 00585 recurse = true; 00586 } 00587 else 00588 { 00589 // alternative if true movement is not possible: 00590 // project current position into triangle 00591 run = currentFace->Edge(); 00592 for ( i = 2; i >= 0; --i ) 00593 { 00594 run = run->Next(); 00595 eCoord centerToPoint = *run->Point() - center; 00596 eCoord runVec = run->Vec(); 00597 REAL prod = centerToPoint * runVec; 00598 if (prod < 0) 00599 { 00600 REAL toClamp = (centerToPos * runVec) / prod; 00601 if ( toClamp > 1 ) 00602 { 00603 centerToPos = centerToPos * (1/toClamp); 00604 } 00605 } 00606 } 00607 pos = center + centerToPos; 00608 } 00609 } 00610 } 00611 }
bool eGameObject::Timestep | ( | REAL | currentTime | ) | [virtual] |
Reimplemented in eNetGameObject, gCycleWallRenderer, gCycle, gCycleMovement, gExplosion, gSpark, gZone, gBaseZoneHack, zMonitor, and zZone.
Definition at line 614 of file eGameObject.cpp.
References lastTime.
Referenced by TimestepThis().
00614 { 00615 lastTime = t; 00616 return 0; 00617 }
virtual bool eGameObject::EdgeIsDangerous | ( | const eWall * | w, | |
REAL | time, | |||
REAL | a | |||
) | const [inline, virtual] |
Reimplemented in gCycleExtrapolator, gCycle, and gCycleMovement.
Definition at line 156 of file eGameObject.h.
Referenced by CanPass().
void eGameObject::OnRoundBegin | ( | ) | [virtual] |
called when the round begins, after all game objects have been created, before the first network sync is sent out.
Definition at line 620 of file eGameObject.cpp.
Referenced by gGame::StateUpdate().
void eGameObject::OnRoundEnd | ( | ) | [virtual] |
called when the round ends
Reimplemented in gCycle.
Definition at line 621 of file eGameObject.cpp.
Referenced by gGame::Analysis().
void eGameObject::Kill | ( | ) | [virtual] |
destroys the gameobject (in the game)
Reimplemented in gCycle, gExplosion, and gSpark.
Definition at line 623 of file eGameObject.cpp.
Referenced by gCycleMovement::AddRef(), gBaseZoneHack::OnVanish(), PassEdge(), eWall::PassingGameObject(), and TimestepThisWrapper().
virtual bool eGameObject::Alive | ( | ) | const [inline, virtual] |
tells whether the object is alive
Reimplemented in gCycleMovement.
Definition at line 171 of file eGameObject.h.
Referenced by gEnemyInfluence::AddWall(), eTeam::Alive(), eTeam::AlivePlayers(), eCamera::CenterAlive(), zSelector::getAllValid(), eCamera::InterestingToWatch(), gBaseZoneHack::OnVanish(), se_DisplayChatLocallyClient(), se_GetAlivePlayerFromUserID(), and sg_RespawnPlayer().
void eGameObject::Render | ( | const eCamera * | cam | ) | [virtual] |
draws object to the screen using OpenGL
Reimplemented in gCycleWallRenderer, gCycle, gExplosion, gSpark, gZone, and zZone.
Definition at line 626 of file eGameObject.cpp.
void eGameObject::Render2D | ( | tCoord | scale | ) | const [virtual] |
Reimplemented in gCycle, gExplosion, gZone, and zZone.
Definition at line 627 of file eGameObject.cpp.
Referenced by cWidget::Map::DrawObjects().
bool eGameObject::RendersAlpha | ( | ) | const [virtual] |
returns whether the rendering uses alpha blending (massively, so sorting errors would show)
Reimplemented in gZone.
Definition at line 638 of file eGameObject.cpp.
Referenced by RenderAll().
bool eGameObject::RenderCockpitFixedBefore | ( | bool | primary = true |
) | [virtual] |
Reimplemented in gCycle.
Definition at line 641 of file eGameObject.cpp.
Referenced by _wrap_EGameObject_render_cockpit_fixed_before__SWIG_1(), and eCamera::CenterCockpitFixedBefore().
void eGameObject::RenderCockpitFixedAfter | ( | bool | primary = true |
) | [virtual] |
Definition at line 645 of file eGameObject.cpp.
Referenced by eCamera::CenterCockpitFixedAfter().
void eGameObject::RenderCockpitVirtual | ( | bool | primary = false |
) | [virtual] |
virtual eCoord eGameObject::CamDir | ( | ) | const [inline, virtual] |
Reimplemented in gCycle.
Definition at line 198 of file eGameObject.h.
References dir.
Referenced by gJoystick::Act(), and eCamera::CenterCamDir().
00198 {return dir;}
virtual REAL eGameObject::CamRise | ( | ) | const [inline, virtual] |
Definition at line 199 of file eGameObject.h.
Referenced by _wrap_EGameObject_cam_rise().
virtual eCoord eGameObject::CamPos | ( | ) | const [inline, virtual] |
Reimplemented in gCycle.
Definition at line 200 of file eGameObject.h.
References pos.
Referenced by eCamera::CenterCamPos().
00200 {return pos;}
virtual REAL eGameObject::CamZ | ( | ) | const [inline, virtual] |
Definition at line 201 of file eGameObject.h.
References z.
Referenced by _wrap_EGameObject_cam_z().
00201 {return z;}
virtual eCoord eGameObject::CamTop | ( | ) | const [inline, virtual] |
Reimplemented in gCycle.
Definition at line 202 of file eGameObject.h.
References eCoord.
Referenced by eCamera::CenterCamTop().
00202 {return eCoord(0,0);}
virtual REAL eGameObject::Lag | ( | ) | const [inline, virtual] |
expected average network latency
Reimplemented in eNetGameObject.
Definition at line 205 of file eGameObject.h.
Referenced by TimestepThisWrapper().
virtual REAL eGameObject::LagThreshold | ( | ) | const [inline, virtual] |
tolerated network latency variation
Reimplemented in eNetGameObject.
Definition at line 206 of file eGameObject.h.
Referenced by TimestepThisWrapper().
bool eGameObject::Act | ( | uActionPlayer * | Act, | |
REAL | x | |||
) | [virtual] |
Reimplemented in gCycle.
Definition at line 677 of file eGameObject.cpp.
Referenced by gCycleChatBot::Activate(), and eNetGameObject::ReceiveControlNet().
Definition at line 824 of file eGameObject.cpp.
References c, eGrid::Check(), eGrid::gameObjects, GrowingArrayBase::Len(), and TimestepThisWrapper().
Referenced by _wrap_EGameObject_s_timestep(), and s_Timestep().
00825 { 00826 #ifdef DEBUG 00827 grid->Check(); 00828 #endif 00829 00830 // simulate game objects 00831 for(int i=grid->gameObjects.Len()-1;i>=0;i--) 00832 { 00833 eGameObject * c = grid->gameObjects(i); 00834 TimestepThisWrapper( grid, currentTime, c, minTimestep ); 00835 } 00836 00837 #ifdef DEBUG 00838 grid->Check(); 00839 #endif 00840 }
Definition at line 846 of file eGameObject.cpp.
References tList< T, MALLOC, REFERENCE >::Add(), eGrid::gameObjects, id, GrowingArrayBase::Len(), NULL, tList< T, MALLOC, REFERENCE >::Remove(), RendersAlpha(), sr_CheckGLError(), sr_glOut, su_FetchAndStoreSDLInput(), and tASSERT.
Referenced by _wrap_EGameObject_render_all(), and eGrid::display_simple().
00846 { 00847 //if (!sr_glOut) 00848 // return; 00849 00850 // first, we need to render all the non-alpha blended objects. 00851 // if we encounter non-alpha blended objects after alpha blended objects 00852 // have already been rendered, we need to re-sort them to the back. 00853 eGameObject * firstAlpha = NULL; 00854 for(int i=grid->gameObjects.Len()-1;i>=0;i--){ 00855 su_FetchAndStoreSDLInput(); 00856 if (sr_glOut){ 00857 eGameObject * object = grid->gameObjects(i); 00858 #ifdef DEBUG 00859 displayed_gameobject = object; 00860 #endif 00861 00862 sr_CheckGLError(); 00863 00864 object->Render(cam); 00865 00866 bool thisAlpha = object->RendersAlpha(); 00867 if ( !thisAlpha && firstAlpha ) 00868 { 00869 // resort the object, switch places with the first alpha blended one. 00870 // This will only have an effect in the next frame, 00871 // but the small flickering error is to be tolerated, especially 00872 // since alpha blended game objects tend to gently fade in. 00873 int firstAlphaID = firstAlpha->id; 00874 grid->gameObjects.Remove(firstAlpha,firstAlpha->id); 00875 grid->gameObjects.Add(firstAlpha,firstAlpha->id); 00876 grid->gameObjects.Remove(object,object->id); 00877 grid->gameObjects.Add(object,object->id); 00878 00879 // the first alpha blended object no longer is the first. Look for 00880 // a replacement, only one object is a candidate. 00881 firstAlpha = 0; 00882 if ( firstAlphaID > 0 ) 00883 { 00884 firstAlpha = grid->gameObjects(firstAlphaID - 1); 00885 tASSERT( firstAlpha->RendersAlpha() ); 00886 } 00887 } 00888 if ( thisAlpha && !firstAlpha ) 00889 { 00890 // store first known alpha blending object 00891 firstAlpha = object; 00892 } 00893 sr_CheckGLError(); 00894 00895 #ifdef DEBUG 00896 displayed_gameobject = 0; 00897 #endif 00898 } 00899 } 00900 }
static void eGameObject::PPDisplayAll | ( | ) | [static] |
void eGameObject::DeleteAll | ( | eGrid * | grid | ) | [static] |
Definition at line 911 of file eGameObject.cpp.
References eGrid::gameObjects, GrowingArrayBase::Len(), pp_out, and RemoveFromGame().
Referenced by _wrap_EGameObject_delete_all(), eGrid::Clear(), and exit_game_objects().
00911 { 00912 int i; 00913 for(i=grid->gameObjects.Len()-1;i>=0;i--) 00914 { 00915 eGameObject* o = grid->gameObjects(i); 00916 o->RemoveFromGame(); 00917 #ifdef POWERPAK_DEB 00918 if (pp_out) o->PPDisplay(); 00919 #endif 00920 } 00921 }
friend class eFace [friend] |
Definition at line 46 of file eGameObject.h.
friend class eCamera [friend] |
Definition at line 47 of file eGameObject.h.
friend class eSensor [friend] |
Definition at line 48 of file eGameObject.h.
friend class eGrid [friend] |
Definition at line 49 of file eGameObject.h.
friend class ePlayerNetID [friend] |
int eGameObject::id [private] |
Definition at line 53 of file eGameObject.h.
Referenced by GOID(), RemoveFromList(), RemoveFromListsAll(), and RenderAll().
int eGameObject::interestingID [protected] |
Definition at line 69 of file eGameObject.h.
Referenced by eGrid::AddGameObjectInteresting(), eGameObject(), RemoveFromListsAll(), and eGrid::RemoveGameObjectInteresting().
int eGameObject::inactiveID [protected] |
Definition at line 70 of file eGameObject.h.
Referenced by eGrid::AddGameObjectInactive(), AddToList(), eGameObject(), RemoveFromList(), RemoveFromListsAll(), and eGrid::RemoveGameObjectInactive().
bool eGameObject::autodelete [protected] |
Definition at line 79 of file eGameObject.h.
Referenced by eNetGameObject::eNetGameObject(), TimestepThisWrapper(), and eNetGameObject::WriteCreate().
REAL eGameObject::lastTime [protected] |
Definition at line 80 of file eGameObject.h.
Referenced by gCycle::CalculatePredictPosition(), gCycleMovement::CanMakeTurn(), eNetGameObject::clientside_action(), gCycleMovement::CopyFrom(), gCycleMovement::DoTurn(), gCycle::DropWall(), eGameObject(), zZone::EvaluateFunctionNow(), gZone::EvaluateFunctionNow(), gCycle::Extrapolate(), FindCurrentFace(), gCycle::gCycle(), gExplosion::gExplosion(), gSpark::gSpark(), gZone::gZone(), gExplosion::Kill(), gCycle::Kill(), gCycle::KillAt(), LastTime(), Move(), gCycleMovement::MyInitAfterCreation(), gCycle::MyInitAfterCreation(), NextInterestingTime(), gCycle::OnNotifyNewDestination(), gCycle::OnRemoveFromGame(), gCycle::PassEdge(), gCycle::PreparePredictPosition(), gCycle::ReadSync(), eNetGameObject::ReadSync(), gZone::Render(), gExplosion::Render(), gCycle::Render(), gExplosion::Render2D(), zZone::SetFunctionNow(), gZone::SetFunctionNow(), zZone::SetReferenceTime(), gZone::SetReferenceTime(), gCycle::SyncEnemy(), zZone::Timestep(), zMonitor::Timestep(), gBaseZoneHack::Timestep(), gZone::Timestep(), gSpark::Timestep(), gExplosion::Timestep(), gCycleMovement::Timestep(), gCycle::Timestep(), gCycleWallRenderer::Timestep(), eNetGameObject::Timestep(), Timestep(), gCycleMovement::TimestepCore(), gCycle::TimestepCore(), TimestepThis(), TimestepThisWrapper(), gCycle::Vulnerable(), gCycle::WriteSync(), eNetGameObject::WriteSync(), and zZone::zZone().
REAL eGameObject::deathTime [protected] |
Definition at line 81 of file eGameObject.h.
Referenced by DeathTime(), gCycleMovement::Die(), gCycle::gCycle(), eCamera::InterestingToWatch(), gCycle::ReadSync(), gCycleMovement::Timestep(), and gCycle::WriteSync().
eCoord eGameObject::pos [protected] |
Definition at line 83 of file eGameObject.h.
Referenced by gCycleMovement::CalculateAcceleration(), gCycle::CalculatePredictPosition(), CamPos(), gCycleMovement::CopyFrom(), eSensor::detect(), gCycle::Die(), gCycleMovement::DistanceToDestination(), gCycleMovement::DoGetDistanceSinceLastTurn(), gCycleMovement::DoTurn(), gCycle::DoTurn(), gCycle::DropWall(), eSensor::eSensor(), FindCurrentFace(), gCycleMovement::GetMaxSpaceAhead(), gZone::gZone(), gCycle::Kill(), gCycle::KillAt(), Move(), gCycleMovement::MyInitAfterCreation(), gCycle::MyInitAfterCreation(), gExplosion::OnNewWall(), gCycle::OnNotifyNewDestination(), gBaseZoneHack::OnVanish(), gCycle::PassEdge(), Position(), PredictPosition(), zZone::ReadSync(), gZone::ReadSync(), gCycle::ReadSync(), eNetGameObject::ReadSync(), gZone::Render(), gExplosion::Render(), gCycle::Render(), gZone::Render2D(), gExplosion::Render2D(), gCycle::Render2D(), gCycle::ResetExtrapolator(), gZone::SetVelocity(), gCycle::SyncEnemy(), gCycle::SyncFromExtrapolator(), gBaseZoneHack::Timestep(), gExplosion::Timestep(), gCycleMovement::Timestep(), gCycle::Timestep(), gCycleMovement::TimestepCore(), gCycle::TimestepCore(), TimestepThisWrapper(), and zZone::zZone().
eCoord eGameObject::dir [protected] |
Definition at line 84 of file eGameObject.h.
Referenced by gCycle::CamDir(), CamDir(), gCycle::CamPos(), gCycle::CamTop(), gCycleMovement::CopyFrom(), eSensor::detect(), Direction(), gCycle::gCycle(), gCycleMovement::GetMaxSpaceAhead(), LastDirection(), gCycleMovement::MyInitAfterCreation(), gCycle::MyInitAfterCreation(), eSensor::PassEdge(), gCycle::ReadSync(), eNetGameObject::ReadSync(), gCycle::Render(), gCycle::Render2D(), gCycle::ResetExtrapolator(), and gCycle::TimestepCore().
REAL eGameObject::z [protected] |
Definition at line 85 of file eGameObject.h.
Referenced by gCycle::CamPos(), CamZ(), eCamera::CenterZ(), gExplosion::gExplosion(), gCycleMovement::MyInitAfterCreation(), gCycle::Render(), and gCycle::RenderName().
tJUST_CONTROLLED_PTR< eTeam > eGameObject::team [protected] |
Definition at line 87 of file eGameObject.h.
Referenced by gBaseZoneHack::CheckSurvivor(), ePlayerNetID::ControlObject(), gCycleMovement::CopyFrom(), eNetGameObject::DoRemoveFromGame(), eGameObject(), gBaseZoneHack::OnConquest(), gBaseZoneHack::OnEnter(), gBaseZoneHack::OnVanish(), Team(), and gBaseZoneHack::Timestep().
tJUST_CONTROLLED_PTR<eFace> eGameObject::currentFace [protected] |
Definition at line 89 of file eGameObject.h.
Referenced by gCycleMovement::CopyFrom(), gCycleExtrapolator::CopyFrom(), CurrentFace(), eGameObject(), eSensor::eSensor(), FindCurrentFace(), gCycleExtrapolator::gCycleExtrapolator(), Move(), OnRemoveFromGame(), RemoveFromList(), RemoveFromListsAll(), eSensor::SetCurrentFace(), gCycleMovement::TimestepCore(), TimestepThisWrapper(), and ~eGameObject().
uActionPlayer eGameObject::se_turnLeft [static] |
Definition at line 101 of file eGameObject.h.
Referenced by gCycle::Act(), eCamera::Act(), and gCycleChatBot::Activate().
uActionPlayer eGameObject::se_turnRight [static] |
Definition at line 101 of file eGameObject.h.
Referenced by gCycle::Act(), eCamera::Act(), gCycleChatBot::Activate(), and gCycleChatBot::CanMakeTurn().