diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-10-06 18:05:01 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-10-06 18:05:01 +0000 |
| commit | 12472ef7f405f5e8eb620059cbf95926a458538a (patch) | |
| tree | 712cc453e491ff46c96b48785a94093b1d17cb1f /src/game/server/entity.hpp | |
| parent | d1b55351ccc2252917ad494b74bb6ad562df34ce (diff) | |
| download | zcatch-12472ef7f405f5e8eb620059cbf95926a458538a.tar.gz zcatch-12472ef7f405f5e8eb620059cbf95926a458538a.zip | |
major update. continued on ban support. added demo recording (client and server side). added demo player. added demo menu. demos have some quirks and file size optimizations havn't been done yet. some interface tweaks
Diffstat (limited to 'src/game/server/entity.hpp')
| -rw-r--r-- | src/game/server/entity.hpp | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/src/game/server/entity.hpp b/src/game/server/entity.hpp index 8ccb2d9a..debe57b6 100644 --- a/src/game/server/entity.hpp +++ b/src/game/server/entity.hpp @@ -74,34 +74,34 @@ public: /* Function: destroy - Destorys the entity. + Destorys the entity. */ virtual void destroy() { delete this; } /* Function: reset - Called when the game resets the map. Puts the entity - back to it's starting state or perhaps destroys it. + Called when the game resets the map. Puts the entity + back to it's starting state or perhaps destroys it. */ virtual void reset() {} /* Function: tick - Called progress the entity to the next tick. Updates - and moves the entity to it's new state and position. + Called progress the entity to the next tick. Updates + and moves the entity to it's new state and position. */ virtual void tick() {} /* Function: tick_defered - Called after all entities tick() function has been called. + Called after all entities tick() function has been called. */ virtual void tick_defered() {} /* Function: snap - Called when a new snapshot is being generated for a specific - client. + Called when a new snapshot is being generated for a specific + client. Arguments: snapping_client - ID of the client which snapshot is @@ -110,16 +110,34 @@ public: recording. */ virtual void snap(int snapping_client) {} + + /* + Function: networkclipped(int snapping_client) + Performs a series of test to see if a client can see the + entity. + + Arguments: + snapping_client - ID of the client which snapshot is + being generated. Could be -1 to create a complete + snapshot of everything in the game for demo + recording. + + Returns: + Non-zero if the entity doesn't have to be in the snapshot. + */ + int networkclipped(int snapping_client); + int networkclipped(int snapping_client, vec2 check_pos); + /* Variable: proximity_radius - Contains the physical size of the entity. + Contains the physical size of the entity. */ float proximity_radius; /* Variable: pos - Contains the current posititon of the entity. + Contains the current posititon of the entity. */ vec2 pos; }; |