Added item_suit and item_longjump... they do not do anything interesting yet. Decals: Added glass break decals upon impact Damage: Brush-entity radius damage should to work better now Also seperated the weapons table from generic weapon entry functions. This should make maintaining mods easier Fixed references from sv_clientslots to sv_playerslots. My brain gets confused between the Quake games at this point. I blame FTE Fixed sprite animation cycle length check. It attempted to play one more frame than any sprite ever has. Needs more heavy testing?
75 lines
1.4 KiB
C++
75 lines
1.4 KiB
C++
/***
|
|
*
|
|
* Copyright (c) 2016-2019 Marco 'eukara' Hladik. All rights reserved.
|
|
*
|
|
* See the file LICENSE attached with the sources for usage details.
|
|
*
|
|
****/
|
|
|
|
string __fullspawndata;
|
|
|
|
class CBaseEntity {
|
|
string targetname;
|
|
string target;
|
|
|
|
void() CBaseEntity;
|
|
|
|
virtual void() Init;
|
|
virtual void() Initialized;
|
|
virtual void(string, string) SpawnKey;
|
|
};
|
|
|
|
void CBaseEntity :: SpawnKey (string strField, string strKey) {
|
|
switch ( strField ) {
|
|
case "targetname":
|
|
targetname = strKey;
|
|
break;
|
|
case "target":
|
|
target = strKey;
|
|
break;
|
|
case "origin":
|
|
origin = stov( strKey );
|
|
setorigin( this, origin );
|
|
break;
|
|
case "angles":
|
|
angles = stov( strKey );
|
|
break;
|
|
case "model":
|
|
model = strKey;
|
|
break;
|
|
case "style":
|
|
style = stof( strKey );
|
|
break;
|
|
case "color":
|
|
color = stov( strKey );
|
|
break;
|
|
case "movetype":
|
|
movetype = stof( strKey );
|
|
break;
|
|
case "solid":
|
|
solid = stof( strKey );
|
|
break;
|
|
case "scale":
|
|
scale = stof( strKey );
|
|
break;
|
|
default:
|
|
//dprint(sprintf("Unknown field %s, value %s\n", strField, strKey));
|
|
}
|
|
}
|
|
|
|
void CBaseEntity::Init(void)
|
|
{
|
|
for (int i = 0; i < (tokenize(__fullspawndata) - 1); i += 2) {
|
|
//dprint(sprintf("SpawnData: %s %s\n", argv(i), argv(i+1)));
|
|
SpawnKey(argv(i), argv(i+1));
|
|
}
|
|
Initialized();
|
|
}
|
|
|
|
void CBaseEntity::Initialized(void)
|
|
{
|
|
}
|
|
|
|
void CBaseEntity::CBaseEntity(void)
|
|
{
|
|
}
|