Skip to content

Commit 76d9725

Browse files
Morel Bérengerillwieckz
authored andcommitted
move entityType_t in gamelogic
1 parent e14bb7a commit 76d9725

File tree

2 files changed

+1
-86
lines changed

2 files changed

+1
-86
lines changed

src/engine/qcommon/q_shared.cpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -288,45 +288,6 @@ int Com_HashKey( char *string, int maxlen )
288288
/*
289289
============================================================================
290290
291-
q_shared.h-enum to name conversion
292-
293-
============================================================================
294-
*/
295-
296-
const char *Com_EntityTypeName(entityType_t entityType)
297-
{
298-
switch (entityType)
299-
{
300-
case entityType_t::ET_GENERAL: return "GENERAL";
301-
case entityType_t::ET_PLAYER: return "PLAYER";
302-
case entityType_t::ET_ITEM: return "ITEM";
303-
case entityType_t::ET_BUILDABLE: return "BUILDABLE";
304-
case entityType_t::ET_LOCATION: return "LOCATION";
305-
case entityType_t::ET_MISSILE: return "MISSILE";
306-
case entityType_t::ET_MOVER: return "MOVER";
307-
case entityType_t::ET_PORTAL: return "PORTAL";
308-
case entityType_t::ET_SPEAKER: return "SPEAKER";
309-
case entityType_t::ET_PUSHER: return "PUSHER";
310-
case entityType_t::ET_TELEPORTER: return "TELEPORTER";
311-
case entityType_t::ET_INVISIBLE: return "INVISIBLE";
312-
case entityType_t::ET_FIRE: return "FIRE";
313-
case entityType_t::ET_CORPSE: return "CORPSE";
314-
case entityType_t::ET_PARTICLE_SYSTEM: return "PARTICLE_SYSTEM";
315-
case entityType_t::ET_ANIMMAPOBJ: return "ANIMMAPOBJ";
316-
case entityType_t::ET_MODELDOOR: return "MODELDOOR";
317-
case entityType_t::ET_LIGHTFLARE: return "LIGHTFLARE";
318-
case entityType_t::ET_LEV2_ZAP_CHAIN: return "LEV2_ZAP_CHAIN";
319-
case entityType_t::ET_BEACON: return "BEACON";
320-
default:
321-
if(entityType >= entityType_t::ET_EVENTS)
322-
return "EVENT";
323-
return nullptr;
324-
}
325-
}
326-
327-
/*
328-
============================================================================
329-
330291
PARSING
331292
332293
============================================================================

src/engine/qcommon/q_shared.h

Lines changed: 1 addition & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,56 +2086,10 @@ union OpaquePlayerState {
20862086
//----(SA) removed
20872087
};
20882088

2089-
// entityState_t is the information conveyed from the server
2090-
// in an update message about entities that the client will
2091-
// need to render in some way
2092-
// Different eTypes may use the information in different ways
2093-
// The messages are delta compressed, so it doesn't really matter if
2094-
// the structure size is fairly large
2095-
//
2096-
// NOTE: all fields in here must be 32 bits (or those within sub-structures)
2097-
//
2098-
// You can use Com_EntityTypeName to get a String representation of this enum
2099-
enum class entityType_t
2100-
{
2101-
ET_GENERAL,
2102-
ET_PLAYER,
2103-
ET_ITEM,
2104-
2105-
ET_BUILDABLE, // buildable type
2106-
2107-
ET_LOCATION,
2108-
2109-
ET_MISSILE,
2110-
ET_MOVER,
2111-
ET_UNUSED,
2112-
ET_PORTAL,
2113-
ET_SPEAKER,
2114-
ET_PUSHER,
2115-
ET_TELEPORTER,
2116-
ET_INVISIBLE,
2117-
ET_FIRE,
2118-
2119-
ET_CORPSE,
2120-
ET_PARTICLE_SYSTEM,
2121-
ET_ANIMMAPOBJ,
2122-
ET_MODELDOOR,
2123-
ET_LIGHTFLARE,
2124-
ET_LEV2_ZAP_CHAIN,
2125-
2126-
ET_BEACON,
2127-
2128-
ET_EVENTS // any of the EV_* events can be added freestanding
2129-
// by setting eType to ET_EVENTS + eventNum
2130-
// this avoids having to set eFlags and eventNum
2131-
};
2132-
2133-
const char *Com_EntityTypeName(entityType_t entityType);
2134-
21352089
struct entityState_t
21362090
{
21372091
int number; // entity index
2138-
entityType_t eType; // entityType_t
2092+
int eType; // entityType_t
21392093
int eFlags;
21402094

21412095
trajectory_t pos; // for calculating position

0 commit comments

Comments
 (0)