mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 22:10:59 +00:00
game: cleanup exports and rename TH_viewthing -> viewthing_think
This commit is contained in:
parent
2323e12872
commit
4870c1cc62
8 changed files with 8 additions and 98 deletions
|
@ -1200,56 +1200,3 @@ T_RadiusNukeDamage(edict_t *inflictor, edict_t *attacker, float damage,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Like T_RadiusDamage, but ignores
|
||||
* anything with classname=ignoreClass
|
||||
*/
|
||||
void
|
||||
T_RadiusClassDamage(edict_t *inflictor, edict_t *attacker, float damage,
|
||||
char *ignoreClass, float radius, int mod)
|
||||
{
|
||||
float points;
|
||||
edict_t *ent = NULL;
|
||||
vec3_t v;
|
||||
vec3_t dir;
|
||||
|
||||
if (!inflictor || !attacker || !ignoreClass)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while ((ent = findradius(ent, inflictor->s.origin, radius)) != NULL)
|
||||
{
|
||||
if (ent->classname && !strcmp(ent->classname, ignoreClass))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!ent->takedamage)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
VectorAdd(ent->mins, ent->maxs, v);
|
||||
VectorMA(ent->s.origin, 0.5, v, v);
|
||||
VectorSubtract(inflictor->s.origin, v, v);
|
||||
points = damage - 0.5 * VectorLength(v);
|
||||
|
||||
if (ent == attacker)
|
||||
{
|
||||
points = points * 0.5;
|
||||
}
|
||||
|
||||
if (points > 0)
|
||||
{
|
||||
if (CanDamage(ent, inflictor))
|
||||
{
|
||||
VectorSubtract(ent->s.origin, inflictor->s.origin, dir);
|
||||
T_Damage(ent, inflictor, attacker, dir, inflictor->s.origin,
|
||||
vec3_origin, (int)points, (int)points, DAMAGE_RADIUS,
|
||||
mod);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -834,7 +834,7 @@ SP_point_combat(edict_t *self)
|
|||
* Just for the debugging level. Don't use
|
||||
*/
|
||||
void
|
||||
TH_viewthing(edict_t *ent)
|
||||
viewthing_think(edict_t *ent)
|
||||
{
|
||||
if (!ent)
|
||||
{
|
||||
|
@ -871,7 +871,7 @@ SP_viewthing(edict_t *ent)
|
|||
ent->s.modelindex = gi.modelindex("models/objects/banner/tris.md2");
|
||||
gi.linkentity(ent);
|
||||
ent->nextthink = level.time + 0.5;
|
||||
ent->think = TH_viewthing;
|
||||
ent->think = viewthing_think;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -808,8 +808,6 @@ void T_RadiusDamage(edict_t *inflictor, edict_t *attacker,
|
|||
int mod);
|
||||
void T_RadiusNukeDamage(edict_t *inflictor, edict_t *attacker, float damage,
|
||||
edict_t *ignore, float radius, int mod);
|
||||
void T_RadiusClassDamage(edict_t *inflictor, edict_t *attacker, float damage,
|
||||
char *ignoreClass, float radius, int mod);
|
||||
void cleanupHealTarget(edict_t *ent);
|
||||
|
||||
/* damage flags */
|
||||
|
@ -858,7 +856,6 @@ void monster_dabeam(edict_t *self);
|
|||
void monster_fire_blueblaster(edict_t *self, vec3_t start, vec3_t dir, int damage,
|
||||
int speed, int flashtype, int effect);
|
||||
|
||||
void Widow2Precache(void);
|
||||
void M_droptofloor(edict_t *ent);
|
||||
void monster_think(edict_t *self);
|
||||
void walkmonster_start(edict_t *self);
|
||||
|
|
|
@ -824,7 +824,7 @@ stalker_attack_melee(edict_t *self)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
calcJumpAngle(vec3_t start, vec3_t end, float velocity, vec3_t angles)
|
||||
{
|
||||
float distV, distH;
|
||||
|
|
|
@ -1820,7 +1820,7 @@ WidowCalcSlots(edict_t *self)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
WidowPrecache(void)
|
||||
{
|
||||
/* cache in all of the stalker stuff, widow stuff, spawngro stuff, gibs */
|
||||
|
|
|
@ -1436,7 +1436,7 @@ Widow2_CheckAttack(edict_t *self)
|
|||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Widow2Precache(void)
|
||||
{
|
||||
/* cache in all of the stalker stuff, widow stuff, spawngro stuff, gibs */
|
||||
|
@ -1539,7 +1539,7 @@ SP_monster_widow2(edict_t *self)
|
|||
walkmonster_start(self);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
WidowVelocityForDamage(int damage, vec3_t v)
|
||||
{
|
||||
v[0] = damage * crandom();
|
||||
|
|
|
@ -42,10 +42,6 @@ extern edict_t * PlayerTrail_PickFirst ( edict_t * self ) ;
|
|||
extern edict_t * PlayerTrail_PickNext ( edict_t * self ) ;
|
||||
extern edict_t * SelectFarthestDeathmatchSpawnPoint ( void ) ;
|
||||
extern edict_t * SelectRandomDeathmatchSpawnPoint ( void ) ;
|
||||
extern edict_t * SpawnBadArea ( vec3_t mins , vec3_t maxs , float lifespan , edict_t * owner ) ;
|
||||
extern edict_t * Sphere_Spawn ( edict_t * owner , int spawnflags ) ;
|
||||
extern edict_t * findradius ( edict_t * from , vec3_t org , float rad ) ;
|
||||
extern edict_t * findradius2 ( edict_t * from , vec3_t org , float rad ) ;
|
||||
extern edict_t * fixbot_FindDeadMonster ( edict_t * self ) ;
|
||||
extern edict_t * medic_FindDeadMonster ( edict_t * self ) ;
|
||||
extern float PlayersRangeFromSpot ( edict_t * spot ) ;
|
||||
|
@ -342,23 +338,15 @@ extern void SetTriggeredSpawn ( edict_t * ent ) ;
|
|||
extern void ShamClaw(edict_t* self);
|
||||
extern void ShamblerCastLightning(edict_t* self);
|
||||
extern void ShamblerSaveLoc(edict_t* self);
|
||||
extern void SpawnEntities ( const char * mapname , char * entities , const char * spawnpoint ) ;
|
||||
extern void SpawnGrow_Spawn ( vec3_t startpos , int size ) ;
|
||||
extern void SpawnItem ( edict_t * ent , gitem_t * item ) ;
|
||||
extern void TH_viewthing ( edict_t * ent ) ;
|
||||
extern void T_Damage ( edict_t * targ , edict_t * inflictor , edict_t * attacker , vec3_t dir , vec3_t point , vec3_t normal , int damage , int knockback , int dflags , int mod ) ;
|
||||
extern void T_RadiusClassDamage ( edict_t * inflictor , edict_t * attacker , float damage , char * ignoreClass , float radius , int mod ) ;
|
||||
extern void T_RadiusDamage ( edict_t * inflictor , edict_t * attacker , float damage , edict_t * ignore , float radius , int mod ) ;
|
||||
extern void T_RadiusNukeDamage ( edict_t * inflictor , edict_t * attacker , float damage , edict_t * ignore , float radius , int mod ) ;
|
||||
extern void viewthing_think ( edict_t * ent ) ;
|
||||
extern void Tag_DogTag ( edict_t * ent , edict_t * killer , char * * pic ) ;
|
||||
extern void Tag_DropToken ( edict_t * ent , gitem_t * item ) ;
|
||||
extern void Tag_GameInit ( void ) ;
|
||||
extern void Tag_KillItBonus ( edict_t * self ) ;
|
||||
extern void Tag_MakeTouchable ( edict_t * ent ) ;
|
||||
extern void Tag_PlayerDeath ( edict_t * targ , edict_t * inflictor , edict_t * attacker ) ;
|
||||
extern void Tag_PlayerDisconnect ( edict_t * self ) ;
|
||||
extern void Tag_PlayerEffects ( edict_t * ent ) ;
|
||||
extern void Tag_PostInitSetup ( void ) ;
|
||||
extern void Tag_Respawn ( edict_t * ent ) ;
|
||||
extern void Tag_Score ( edict_t * attacker , edict_t * victim , int scoreChange ) ;
|
||||
extern void TankBlaster ( edict_t * self ) ;
|
||||
|
@ -451,7 +439,6 @@ extern void Weapon_Trap ( edict_t * ent ) ;
|
|||
extern void Widow2Beam ( edict_t * self ) ;
|
||||
extern void Widow2BeamTargetRemove ( edict_t * self ) ;
|
||||
extern void Widow2Crunch ( edict_t * self ) ;
|
||||
extern void Widow2Precache ( void ) ;
|
||||
extern void Widow2SaveBeamTarget ( edict_t * self ) ;
|
||||
extern void Widow2SaveDisruptLoc ( edict_t * self ) ;
|
||||
extern void Widow2Spawn ( edict_t * self ) ;
|
||||
|
@ -476,13 +463,10 @@ extern void WidowGoinQuad ( edict_t * self , float framenum ) ;
|
|||
extern void WidowPent ( edict_t * self , float framenum ) ;
|
||||
extern void WidowPowerArmor ( edict_t * self ) ;
|
||||
extern void WidowPowerups ( edict_t * self ) ;
|
||||
extern void WidowPrecache ( void ) ;
|
||||
extern void WidowRail ( edict_t * self ) ;
|
||||
extern void WidowRespondPowerup ( edict_t * self , edict_t * other ) ;
|
||||
extern void WidowSaveLoc ( edict_t * self ) ;
|
||||
extern void WidowSpawn ( edict_t * self ) ;
|
||||
extern void WidowVelocityForDamage ( int damage , vec3_t v ) ;
|
||||
extern void Widowlegs_Spawn ( vec3_t startpos , vec3_t angles ) ;
|
||||
extern void abortHeal ( edict_t *self, qboolean change_frame, qboolean gib, qboolean mark ) ;
|
||||
extern void actorMachineGun ( edict_t * self ) ;
|
||||
extern void actor_attack ( edict_t * self ) ;
|
||||
|
@ -612,7 +596,6 @@ extern void button_return ( edict_t * self ) ;
|
|||
extern void button_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
|
||||
extern void button_use ( edict_t * self , edict_t * other , edict_t * activator ) ;
|
||||
extern void button_wait ( edict_t * self ) ;
|
||||
extern void calcJumpAngle ( vec3_t start , vec3_t end , float velocity , vec3_t angles ) ;
|
||||
extern void carrier_attack ( edict_t * self ) ;
|
||||
extern void carrier_attack_gren ( edict_t * self ) ;
|
||||
extern void carrier_attack_mg ( edict_t * self ) ;
|
||||
|
|
|
@ -280,27 +280,17 @@
|
|||
{"ShamClaw", (byte *)ShamClaw},
|
||||
{"ShamblerCastLightning", (byte *)ShamblerCastLightning},
|
||||
{"ShamblerSaveLoc", (byte *)ShamblerSaveLoc},
|
||||
{"SpawnBadArea", (byte *)SpawnBadArea},
|
||||
{"SpawnEntities", (byte *)SpawnEntities},
|
||||
{"SpawnGrow_Spawn", (byte *)SpawnGrow_Spawn},
|
||||
{"SpawnItem", (byte *)SpawnItem},
|
||||
{"Sphere_Spawn", (byte *)Sphere_Spawn},
|
||||
{"TH_viewthing", (byte *)TH_viewthing},
|
||||
{"T_Damage", (byte *)T_Damage},
|
||||
{"T_RadiusClassDamage", (byte *)T_RadiusClassDamage},
|
||||
{"T_RadiusDamage", (byte *)T_RadiusDamage},
|
||||
{"T_RadiusNukeDamage", (byte *)T_RadiusNukeDamage},
|
||||
{"viewthing_think", (byte *)viewthing_think},
|
||||
{"Tag_ChangeDamage", (byte *)Tag_ChangeDamage},
|
||||
{"Tag_DogTag", (byte *)Tag_DogTag},
|
||||
{"Tag_DropToken", (byte *)Tag_DropToken},
|
||||
{"Tag_GameInit", (byte *)Tag_GameInit},
|
||||
{"Tag_KillItBonus", (byte *)Tag_KillItBonus},
|
||||
{"Tag_MakeTouchable", (byte *)Tag_MakeTouchable},
|
||||
{"Tag_PickupToken", (byte *)Tag_PickupToken},
|
||||
{"Tag_PlayerDeath", (byte *)Tag_PlayerDeath},
|
||||
{"Tag_PlayerDisconnect", (byte *)Tag_PlayerDisconnect},
|
||||
{"Tag_PlayerEffects", (byte *)Tag_PlayerEffects},
|
||||
{"Tag_PostInitSetup", (byte *)Tag_PostInitSetup},
|
||||
{"Tag_Respawn", (byte *)Tag_Respawn},
|
||||
{"Tag_Score", (byte *)Tag_Score},
|
||||
{"TankBlaster", (byte *)TankBlaster},
|
||||
|
@ -393,7 +383,6 @@
|
|||
{"Widow2Beam", (byte *)Widow2Beam},
|
||||
{"Widow2BeamTargetRemove", (byte *)Widow2BeamTargetRemove},
|
||||
{"Widow2Crunch", (byte *)Widow2Crunch},
|
||||
{"Widow2Precache", (byte *)Widow2Precache},
|
||||
{"Widow2SaveBeamTarget", (byte *)Widow2SaveBeamTarget},
|
||||
{"Widow2SaveDisruptLoc", (byte *)Widow2SaveDisruptLoc},
|
||||
{"Widow2Spawn", (byte *)Widow2Spawn},
|
||||
|
@ -419,15 +408,12 @@
|
|||
{"WidowPent", (byte *)WidowPent},
|
||||
{"WidowPowerArmor", (byte *)WidowPowerArmor},
|
||||
{"WidowPowerups", (byte *)WidowPowerups},
|
||||
{"WidowPrecache", (byte *)WidowPrecache},
|
||||
{"WidowRail", (byte *)WidowRail},
|
||||
{"WidowRespondPowerup", (byte *)WidowRespondPowerup},
|
||||
{"WidowSaveLoc", (byte *)WidowSaveLoc},
|
||||
{"WidowSpawn", (byte *)WidowSpawn},
|
||||
{"WidowTorso", (byte *)WidowTorso},
|
||||
{"WidowVelocityForDamage", (byte *)WidowVelocityForDamage},
|
||||
{"Widow_CheckAttack", (byte *)Widow_CheckAttack},
|
||||
{"Widowlegs_Spawn", (byte *)Widowlegs_Spawn},
|
||||
{"abortHeal", (byte *)abortHeal},
|
||||
{"actorMachineGun", (byte *)actorMachineGun},
|
||||
{"actor_attack", (byte *)actor_attack},
|
||||
|
@ -564,7 +550,6 @@
|
|||
{"button_touch", (byte *)button_touch},
|
||||
{"button_use", (byte *)button_use},
|
||||
{"button_wait", (byte *)button_wait},
|
||||
{"calcJumpAngle", (byte *)calcJumpAngle},
|
||||
{"canReach", (byte *)canReach},
|
||||
{"carrier_attack", (byte *)carrier_attack},
|
||||
{"carrier_attack_gren", (byte *)carrier_attack_gren},
|
||||
|
@ -666,8 +651,6 @@
|
|||
{"fd_secret_move5", (byte *)fd_secret_move5},
|
||||
{"fd_secret_move6", (byte *)fd_secret_move6},
|
||||
{"fd_secret_use", (byte *)fd_secret_use},
|
||||
{"findradius", (byte *)findradius},
|
||||
{"findradius2", (byte *)findradius2},
|
||||
{"fire_beams", (byte *)fire_beams},
|
||||
{"fire_bfg", (byte *)fire_bfg},
|
||||
{"fire_blaster", (byte *)fire_blaster},
|
||||
|
|
Loading…
Reference in a new issue