mirror of
https://github.com/blendogames/thirtyflightsofloving.git
synced 2025-02-21 11:10:58 +00:00
Fixed EMP Nuke not working on beta class Gladiator in missionpack DLL.
Added function monster_fire_phalanx() in g_monster.c in missionpack DLL. Renamed monster_dabeam() function to monster_fire_dabeam() in g_monster.c in missionpack DLL. Renamed "plasma" functions for phalanx cannon to "phalanx_plasma" in g_weapon.c in missionpack DLL. Removed unused heat_think() function in g_weapon.c in missionpack DLL. Removed unused Q1TeleportSounds2() function in g_utils_q1.c in missionpack DLL.
This commit is contained in:
parent
d74c17da6f
commit
40571031c3
15 changed files with 127 additions and 213 deletions
|
@ -1632,13 +1632,13 @@ extern void SP_trap ( edict_t * trap ) ;
|
|||
extern void trap_delayed_start ( edict_t * trap ) ;
|
||||
extern void fire_trap ( edict_t * self , vec3_t start , vec3_t aimdir , int damage , int speed , float timer , float damage_radius , qboolean held ) ;
|
||||
extern void Trap_Think ( edict_t * ent ) ;
|
||||
extern void SP_plasma ( edict_t * plasma ) ;
|
||||
extern void plasma_delayed_start ( edict_t * plasma ) ;
|
||||
extern void fire_plasma ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , float damage_radius , int radius_damage ) ;
|
||||
extern void SP_phalanx_plasma ( edict_t * ph_plasma ) ;
|
||||
extern void phalanx_plasma_delayed_start ( edict_t * ph_plasma ) ;
|
||||
extern void fire_phalanx_plasma ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , float damage_radius , int radius_damage ) ;
|
||||
extern void plasma_touch ( edict_t * ent , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
|
||||
extern void phalanx_plasma_touch ( edict_t * ent , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
|
||||
extern void fire_rocket_heat ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , float damage_radius , int radius_damage ) ;
|
||||
extern void rocket_heat_think ( edict_t * self ) ;
|
||||
extern void heat_think ( edict_t * self ) ;
|
||||
extern void SP_ion ( edict_t * ion ) ;
|
||||
extern void ion_delayed_start ( edict_t * ion ) ;
|
||||
extern void fire_ionripper ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , int effect ) ;
|
||||
|
@ -1693,7 +1693,6 @@ extern void vehicle_disengage ( edict_t * vehicle ) ;
|
|||
extern void vehicle_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
|
||||
extern void vehicle_blocked ( edict_t * self , edict_t * other ) ;
|
||||
extern void func_vehicle_explode ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
|
||||
extern void Q1TeleportSounds2 ( edict_t * ent1 , edict_t * ent2 ) ;
|
||||
extern void Q1TeleportSounds ( edict_t * ent ) ;
|
||||
extern float PointDist ( vec3_t x , vec3_t y ) ;
|
||||
extern qboolean UseRegularGoodGuyFlag ( edict_t * monster ) ;
|
||||
|
@ -2276,7 +2275,8 @@ extern void monster_fire_plasma_rifle ( edict_t * self , vec3_t start , vec3_t d
|
|||
extern void monster_fire_heat ( edict_t * self , vec3_t start , vec3_t dir , vec3_t offset , int damage , int kick , int flashtype ) ;
|
||||
extern void monster_fire_tracker ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , edict_t * enemy , int flashtype ) ;
|
||||
extern void monster_fire_blaster2 ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , int flashtype , int effect ) ;
|
||||
extern void monster_dabeam ( edict_t * self ) ;
|
||||
extern void monster_fire_phalanx ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , float damage_radius , int radius_damage , int flashtype ) ;
|
||||
extern void monster_fire_dabeam ( edict_t * self ) ;
|
||||
extern void dabeam_hit ( edict_t * self ) ;
|
||||
extern void monster_fire_rocket_heat ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , int flashtype ) ;
|
||||
extern void monster_fire_ionripper ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , int flashtype , int effect ) ;
|
||||
|
|
|
@ -1632,13 +1632,13 @@
|
|||
{"trap_delayed_start", (byte *)trap_delayed_start},
|
||||
{"fire_trap", (byte *)fire_trap},
|
||||
{"Trap_Think", (byte *)Trap_Think},
|
||||
{"SP_plasma", (byte *)SP_plasma},
|
||||
{"plasma_delayed_start", (byte *)plasma_delayed_start},
|
||||
{"fire_plasma", (byte *)fire_plasma},
|
||||
{"SP_phalanx_plasma", (byte *)SP_phalanx_plasma},
|
||||
{"phalanx_plasma_delayed_start", (byte *)phalanx_plasma_delayed_start},
|
||||
{"fire_phalanx_plasma", (byte *)fire_phalanx_plasma},
|
||||
{"plasma_touch", (byte *)plasma_touch},
|
||||
{"phalanx_plasma_touch", (byte *)phalanx_plasma_touch},
|
||||
{"fire_rocket_heat", (byte *)fire_rocket_heat},
|
||||
{"rocket_heat_think", (byte *)rocket_heat_think},
|
||||
{"heat_think", (byte *)heat_think},
|
||||
{"SP_ion", (byte *)SP_ion},
|
||||
{"ion_delayed_start", (byte *)ion_delayed_start},
|
||||
{"fire_ionripper", (byte *)fire_ionripper},
|
||||
|
@ -1693,7 +1693,6 @@
|
|||
{"vehicle_touch", (byte *)vehicle_touch},
|
||||
{"vehicle_blocked", (byte *)vehicle_blocked},
|
||||
{"func_vehicle_explode", (byte *)func_vehicle_explode},
|
||||
{"Q1TeleportSounds2", (byte *)Q1TeleportSounds2},
|
||||
{"Q1TeleportSounds", (byte *)Q1TeleportSounds},
|
||||
{"PointDist", (byte *)PointDist},
|
||||
{"UseRegularGoodGuyFlag", (byte *)UseRegularGoodGuyFlag},
|
||||
|
@ -2276,7 +2275,8 @@
|
|||
{"monster_fire_heat", (byte *)monster_fire_heat},
|
||||
{"monster_fire_tracker", (byte *)monster_fire_tracker},
|
||||
{"monster_fire_blaster2", (byte *)monster_fire_blaster2},
|
||||
{"monster_dabeam", (byte *)monster_dabeam},
|
||||
{"monster_fire_phalanx", (byte *)monster_fire_phalanx},
|
||||
{"monster_fire_dabeam", (byte *)monster_fire_dabeam},
|
||||
{"dabeam_hit", (byte *)dabeam_hit},
|
||||
{"monster_fire_rocket_heat", (byte *)monster_fire_rocket_heat},
|
||||
{"monster_fire_ionripper", (byte *)monster_fire_ionripper},
|
||||
|
|
|
@ -1249,7 +1249,6 @@ edict_t *findradius2 (edict_t *from, vec3_t org, float rad);
|
|||
//
|
||||
float PointDist (vec3_t x, vec3_t y);
|
||||
void Q1TeleportSounds (edict_t *ent);
|
||||
void Q1TeleportSounds2 (edict_t *ent1, edict_t *ent2);
|
||||
|
||||
//
|
||||
// g_combat.c
|
||||
|
@ -1371,7 +1370,9 @@ void monster_fire_bfg (edict_t *self, vec3_t start, vec3_t aimdir, int damage, i
|
|||
void monster_fire_blueblaster (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect);
|
||||
void monster_fire_ionripper (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect);
|
||||
void monster_fire_rocket_heat (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype);
|
||||
void monster_dabeam (edict_t *self);
|
||||
void monster_fire_dabeam (edict_t *self);
|
||||
// Knightmare added
|
||||
void monster_fire_phalanx (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage, int flashtype);
|
||||
|
||||
// ROGUE
|
||||
void monster_fire_blaster2 (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect);
|
||||
|
@ -1491,7 +1492,7 @@ void fire_plasma_rifle (edict_t *ent, vec3_t start, vec3_t dir, int damage, int
|
|||
void fire_ionripper (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int effect);
|
||||
void fire_rocket_heat (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage);
|
||||
void fire_blueblaster (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int effect);
|
||||
void fire_plasma (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage);
|
||||
void fire_phalanx_plasma (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage); // Knightmare- renamed this, was fire_plasma
|
||||
void fire_trap (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius, qboolean held);
|
||||
void Trap_Die(edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point);
|
||||
void Cmd_KillTrap_f (edict_t *ent);
|
||||
|
@ -2463,9 +2464,9 @@ struct edict_s
|
|||
float roll_speed;
|
||||
float ideal_yaw;
|
||||
float ideal_pitch;
|
||||
float ideal_roll; //roll value for a path_corner
|
||||
float roll; //roll value for a path_corner
|
||||
int turn_rider; //whether to turn rider
|
||||
float ideal_roll; // roll value for a path_corner
|
||||
float roll; // roll value for a path_corner
|
||||
int turn_rider; // whether to turn rider
|
||||
|
||||
char *common_name;
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ void ThrowHead (edict_t *self, char *gibname, int frame, int skinnum, int damage
|
|||
if (self->blood_type == 1)
|
||||
vscale = 3.0;
|
||||
else
|
||||
vscale = 1.0; //was 0.5
|
||||
vscale = 1.0; // was 0.5
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -368,7 +368,7 @@ void dabeam_hit (edict_t *self)
|
|||
}
|
||||
|
||||
// RAFAEL
|
||||
void monster_dabeam (edict_t *self)
|
||||
void monster_fire_dabeam (edict_t *self)
|
||||
{
|
||||
vec3_t last_movedir;
|
||||
vec3_t point;
|
||||
|
@ -409,6 +409,26 @@ void monster_dabeam (edict_t *self)
|
|||
self->svflags &= ~SVF_NOCLIENT;
|
||||
}
|
||||
|
||||
// Knightmare- this should have been added by Xatrix!
|
||||
void monster_fire_phalanx (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage, int flashtype)
|
||||
{
|
||||
// Zaero add
|
||||
if (EMPNukeCheck(self, start))
|
||||
{
|
||||
gi.sound (self, CHAN_AUTO, gi.soundindex("items/empnuke/emp_missfire.wav"), 1, ATTN_NORM, 0);
|
||||
return;
|
||||
}
|
||||
// end Zaero
|
||||
|
||||
fire_phalanx_plasma (self, start, dir, damage, speed, damage_radius, radius_damage);
|
||||
|
||||
// Don't actually send a muzzleflash here because Xatrix forgot to add one!
|
||||
/* gi.WriteByte (svc_muzzleflash2);
|
||||
gi.WriteShort (self - g_edicts);
|
||||
gi.WriteByte (flashtype);
|
||||
gi.multicast (start, MULTICAST_PVS); */
|
||||
}
|
||||
|
||||
// ROGUE
|
||||
void monster_fire_blaster2 (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype, int effect)
|
||||
{
|
||||
|
@ -1070,7 +1090,7 @@ void monster_triggered_spawn (edict_t *self)
|
|||
self->s.event = EV_PLAYER_TELEPORT2;
|
||||
#else
|
||||
self->s.event = EV_PLAYER_TELEPORT;
|
||||
Q1TeleportSounds(self);
|
||||
Q1TeleportSounds (self);
|
||||
#endif
|
||||
}
|
||||
// end Knightmare
|
||||
|
|
|
@ -125,7 +125,7 @@ field_t fields[] = {
|
|||
|
||||
{"prethink", FOFS(prethink), F_FUNCTION, FFL_NOSPAWN},
|
||||
{"think", FOFS(think), F_FUNCTION, FFL_NOSPAWN},
|
||||
{"postthink", FOFS(postthink), F_FUNCTION, FFL_NOSPAWN}, //Knightmare added
|
||||
{"postthink", FOFS(postthink), F_FUNCTION, FFL_NOSPAWN}, // Knightmare added
|
||||
{"blocked", FOFS(blocked), F_FUNCTION, FFL_NOSPAWN},
|
||||
{"touch", FOFS(touch), F_FUNCTION, FFL_NOSPAWN},
|
||||
{"use", FOFS(use), F_FUNCTION, FFL_NOSPAWN},
|
||||
|
|
|
@ -354,7 +354,7 @@ void SP_gekk_loogie (edict_t *self);
|
|||
void SP_flechette (edict_t *self);
|
||||
void SP_tracker (edict_t *self);
|
||||
void SP_ion (edict_t *self);
|
||||
void SP_plasma (edict_t *self);
|
||||
void SP_phalanx_plasma (edict_t *self);
|
||||
void SP_debris (edict_t *self);
|
||||
void SP_gib (edict_t *self);
|
||||
void SP_gibhead (edict_t *self);
|
||||
|
@ -749,7 +749,7 @@ spawn_t spawns[] = {
|
|||
{"flechette", SP_flechette},
|
||||
{"tracker", SP_tracker},
|
||||
{"ion", SP_ion},
|
||||
{"plasma", SP_plasma},
|
||||
{"phalanx_plasma", SP_phalanx_plasma},
|
||||
{"debris", SP_debris},
|
||||
{"gib", SP_gib},
|
||||
{"gibhead", SP_gibhead},
|
||||
|
@ -1332,7 +1332,6 @@ qboolean ED_ParseEntityAlias (char *data, edict_t *ent)
|
|||
return alias_loaded;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
END ALIAS SCRIPT LOADING
|
||||
|
@ -1352,7 +1351,7 @@ char *ED_ParseEdict (char *data, edict_t *ent)
|
|||
qboolean init;
|
||||
char keyname[256];
|
||||
char *com_token;
|
||||
//Knightmare added
|
||||
// Knightmare added
|
||||
qboolean alias_loaded = false;
|
||||
|
||||
init = false;
|
||||
|
@ -1805,10 +1804,10 @@ void SpawnEntities (char *mapname, char *entities, char *spawnpoint)
|
|||
#ifdef KMQUAKE2_ENGINE_MOD // use new engine function instead
|
||||
gi.FreeFile(alias_data);
|
||||
#else
|
||||
// if (alias_from_pak)
|
||||
// if (alias_from_pak)
|
||||
gi.TagFree(alias_data);
|
||||
// else
|
||||
// free(&alias_data);
|
||||
// else
|
||||
// free(&alias_data);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -28,33 +28,3 @@ void Q1TeleportSounds (edict_t *ent)
|
|||
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele5.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
|
||||
void Q1TeleportSounds2 (edict_t *ent1, edict_t *ent2)
|
||||
{
|
||||
float sound = random();
|
||||
|
||||
if(sound < 0.2)
|
||||
{
|
||||
gi.sound (ent1, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele1.wav"), 1, ATTN_NORM, 0);
|
||||
gi.sound (ent2, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele1.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
else if (sound < 0.4)
|
||||
{
|
||||
gi.sound (ent1, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele2.wav"), 1, ATTN_NORM, 0);
|
||||
gi.sound (ent2, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele2.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
else if (sound < 0.6)
|
||||
{
|
||||
gi.sound (ent1, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele3.wav"), 1, ATTN_NORM, 0);
|
||||
gi.sound (ent2, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele3.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
else if (sound < 0.8)
|
||||
{
|
||||
gi.sound (ent1, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele4.wav"), 1, ATTN_NORM, 0);
|
||||
gi.sound (ent2, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele4.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
gi.sound (ent1, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele5.wav"), 1, ATTN_NORM, 0);
|
||||
gi.sound (ent2, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele5.wav"), 1, ATTN_NORM, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2225,88 +2225,10 @@ void SP_ion (edict_t *ion)
|
|||
gi.linkentity(ion);
|
||||
}
|
||||
|
||||
// ROGUE
|
||||
/*
|
||||
fire_heat
|
||||
*/
|
||||
|
||||
void heat_think (edict_t *self)
|
||||
{
|
||||
edict_t *target = NULL;
|
||||
edict_t *aquire = NULL;
|
||||
vec3_t vec;
|
||||
vec3_t oldang;
|
||||
int len;
|
||||
int oldlen = 0;
|
||||
|
||||
VectorClear (vec);
|
||||
|
||||
// aquire new target
|
||||
while (( target = findradius (target, self->s.origin, 1024)) != NULL)
|
||||
{
|
||||
|
||||
if (self->owner == target)
|
||||
continue;
|
||||
if (!target->svflags & SVF_MONSTER)
|
||||
continue;
|
||||
if (!target->client)
|
||||
continue;
|
||||
if (target->health <= 0)
|
||||
continue;
|
||||
if (!visible (self, target))
|
||||
continue;
|
||||
|
||||
// if we need to reduce the tracking cone
|
||||
/*
|
||||
{
|
||||
vec3_t vec;
|
||||
float dot;
|
||||
vec3_t forward;
|
||||
|
||||
AngleVectors (self->s.angles, forward, NULL, NULL);
|
||||
VectorSubtract (target->s.origin, self->s.origin, vec);
|
||||
VectorNormalize (vec);
|
||||
dot = DotProduct (vec, forward);
|
||||
|
||||
if (dot > 0.6)
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
|
||||
if (!infront (self, target))
|
||||
continue;
|
||||
|
||||
VectorSubtract (self->s.origin, target->s.origin, vec);
|
||||
len = VectorLength (vec);
|
||||
|
||||
if (aquire == NULL || len < oldlen)
|
||||
{
|
||||
aquire = target;
|
||||
self->target_ent = aquire;
|
||||
oldlen = len;
|
||||
}
|
||||
}
|
||||
|
||||
if (aquire != NULL)
|
||||
{
|
||||
VectorCopy (self->s.angles, oldang);
|
||||
VectorSubtract (aquire->s.origin, self->s.origin, vec);
|
||||
|
||||
vectoangles (vec, self->s.angles);
|
||||
|
||||
VectorNormalize (vec);
|
||||
VectorCopy (vec, self->movedir);
|
||||
VectorScale (vec, 500, self->velocity);
|
||||
}
|
||||
|
||||
self->nextthink = level.time + 0.1;
|
||||
}
|
||||
|
||||
// NOTE: the new Rogue fire_heat is in g_newweap.c
|
||||
/*
|
||||
fire_rocket_heat
|
||||
*/
|
||||
|
||||
void rocket_heat_think (edict_t *self)
|
||||
{
|
||||
edict_t *target = NULL;
|
||||
|
@ -2399,7 +2321,7 @@ void fire_rocket_heat (edict_t *self, vec3_t start, vec3_t dir, int damage, int
|
|||
heat->s.renderfx |= RF_NOSHADOW; //Knightmare- no shadow
|
||||
VectorClear (heat->mins);
|
||||
VectorClear (heat->maxs);
|
||||
//heat->s.modelindex = gi.modelindex ("models/objects/hrocket/tris.md2");
|
||||
// heat->s.modelindex = gi.modelindex ("models/objects/hrocket/tris.md2");
|
||||
heat->s.modelindex = gi.modelindex ("models/objects/rocket/tris.md2");
|
||||
heat->s.skinnum = 1;
|
||||
heat->owner = self;
|
||||
|
@ -2420,12 +2342,10 @@ void fire_rocket_heat (edict_t *self, vec3_t start, vec3_t dir, int damage, int
|
|||
}
|
||||
|
||||
// RAFAEL
|
||||
|
||||
/*
|
||||
fire_plasma
|
||||
fire_phalanx_plasma
|
||||
*/
|
||||
|
||||
void plasma_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||
void phalanx_plasma_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||
{
|
||||
vec3_t origin;
|
||||
|
||||
|
@ -2463,88 +2383,93 @@ void plasma_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *su
|
|||
G_FreeEdict (ent);
|
||||
}
|
||||
|
||||
|
||||
// RAFAEL
|
||||
void fire_plasma (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage)
|
||||
// Knightmare- remove this after the next savegame version increment!
|
||||
void plasma_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
|
||||
{
|
||||
edict_t *plasma;
|
||||
|
||||
plasma = G_Spawn();
|
||||
plasma->classname = "plasma";
|
||||
plasma->class_id = ENTITY_PLASMA;
|
||||
VectorCopy (start, plasma->s.origin);
|
||||
VectorCopy (dir, plasma->movedir);
|
||||
vectoangles (dir, plasma->s.angles);
|
||||
VectorScale (dir, speed, plasma->velocity);
|
||||
plasma->movetype = MOVETYPE_FLYMISSILE;
|
||||
plasma->clipmask = MASK_SHOT;
|
||||
plasma->solid = SOLID_BBOX;
|
||||
|
||||
VectorClear (plasma->mins);
|
||||
VectorClear (plasma->maxs);
|
||||
|
||||
plasma->owner = self;
|
||||
plasma->touch = plasma_touch;
|
||||
plasma->nextthink = level.time + 8000.0f/speed;
|
||||
plasma->think = G_FreeEdict;
|
||||
plasma->dmg = damage;
|
||||
plasma->radius_dmg = radius_damage;
|
||||
plasma->dmg_radius = damage_radius;
|
||||
plasma->s.sound = gi.soundindex ("weapons/rockfly.wav");
|
||||
|
||||
plasma->s.modelindex = gi.modelindex ("sprites/s_photon.sp2");
|
||||
plasma->s.effects |= EF_PLASMA | EF_ANIM_ALLFAST;
|
||||
plasma->s.renderfx |= RF_FULLBRIGHT;
|
||||
|
||||
if (self->client)
|
||||
check_dodge (self, plasma->s.origin, dir, speed);
|
||||
|
||||
gi.linkentity (plasma);
|
||||
phalanx_plasma_touch (ent, other, plane, surf);
|
||||
}
|
||||
|
||||
// NOTE: SP_plasma should ONLY be used to spawn phalanx magslugs that change maps
|
||||
// RAFAEL
|
||||
void fire_phalanx_plasma (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage)
|
||||
{
|
||||
edict_t *ph_plasma;
|
||||
|
||||
ph_plasma = G_Spawn();
|
||||
ph_plasma->classname = "phalanx_plasma";
|
||||
ph_plasma->class_id = ENTITY_PLASMA;
|
||||
VectorCopy (start, ph_plasma->s.origin);
|
||||
VectorCopy (dir, ph_plasma->movedir);
|
||||
vectoangles (dir, ph_plasma->s.angles);
|
||||
VectorScale (dir, speed, ph_plasma->velocity);
|
||||
ph_plasma->movetype = MOVETYPE_FLYMISSILE;
|
||||
ph_plasma->clipmask = MASK_SHOT;
|
||||
ph_plasma->solid = SOLID_BBOX;
|
||||
|
||||
VectorClear (ph_plasma->mins);
|
||||
VectorClear (ph_plasma->maxs);
|
||||
|
||||
ph_plasma->owner = self;
|
||||
ph_plasma->touch = phalanx_plasma_touch;
|
||||
ph_plasma->nextthink = level.time + 8000.0f/speed;
|
||||
ph_plasma->think = G_FreeEdict;
|
||||
ph_plasma->dmg = damage;
|
||||
ph_plasma->radius_dmg = radius_damage;
|
||||
ph_plasma->dmg_radius = damage_radius;
|
||||
ph_plasma->s.sound = gi.soundindex ("weapons/rockfly.wav");
|
||||
|
||||
ph_plasma->s.modelindex = gi.modelindex ("sprites/s_photon.sp2");
|
||||
ph_plasma->s.effects |= EF_PLASMA | EF_ANIM_ALLFAST;
|
||||
ph_plasma->s.renderfx |= RF_FULLBRIGHT;
|
||||
|
||||
if (self->client)
|
||||
check_dodge (self, ph_plasma->s.origin, dir, speed);
|
||||
|
||||
gi.linkentity (ph_plasma);
|
||||
}
|
||||
|
||||
// NOTE: SP_phalanx_plasma should ONLY be used to spawn phalanx magslugs that change maps
|
||||
// via a trigger_transition. It should NOT be used for map entities.
|
||||
|
||||
void plasma_delayed_start (edict_t *plasma)
|
||||
void phalanx_plasma_delayed_start (edict_t *ph_plasma)
|
||||
{
|
||||
if (g_edicts[1].linkcount)
|
||||
{
|
||||
VectorScale(plasma->movedir, plasma->moveinfo.speed, plasma->velocity);
|
||||
plasma->nextthink = level.time + 8000/plasma->moveinfo.speed;
|
||||
plasma->think = G_FreeEdict;
|
||||
gi.linkentity(plasma);
|
||||
VectorScale(ph_plasma->movedir, ph_plasma->moveinfo.speed, ph_plasma->velocity);
|
||||
ph_plasma->nextthink = level.time + 8000.0f / ph_plasma->moveinfo.speed;
|
||||
ph_plasma->think = G_FreeEdict;
|
||||
gi.linkentity(ph_plasma);
|
||||
}
|
||||
else
|
||||
plasma->nextthink = level.time + FRAMETIME;
|
||||
ph_plasma->nextthink = level.time + FRAMETIME;
|
||||
}
|
||||
|
||||
void SP_plasma (edict_t *plasma)
|
||||
void SP_phalanx_plasma (edict_t *ph_plasma)
|
||||
{
|
||||
vec3_t dir;
|
||||
|
||||
plasma->s.modelindex = gi.modelindex ("sprites/s_photon.sp2");
|
||||
plasma->s.effects |= EF_PLASMA | EF_ANIM_ALLFAST;
|
||||
plasma->s.sound = gi.soundindex ("weapons/rockfly.wav");
|
||||
plasma->touch = plasma_touch;
|
||||
AngleVectors(plasma->s.angles, dir, NULL, NULL);
|
||||
VectorCopy (dir, plasma->movedir);
|
||||
plasma->moveinfo.speed = VectorLength(plasma->velocity);
|
||||
if (plasma->moveinfo.speed <= 0)
|
||||
plasma->moveinfo.speed = 650;
|
||||
ph_plasma->s.modelindex = gi.modelindex ("sprites/s_photon.sp2");
|
||||
ph_plasma->s.effects |= EF_PLASMA | EF_ANIM_ALLFAST;
|
||||
ph_plasma->s.sound = gi.soundindex ("weapons/rockfly.wav");
|
||||
ph_plasma->touch = phalanx_plasma_touch;
|
||||
AngleVectors(ph_plasma->s.angles, dir, NULL, NULL);
|
||||
VectorCopy (dir, ph_plasma->movedir);
|
||||
ph_plasma->moveinfo.speed = VectorLength(ph_plasma->velocity);
|
||||
if (ph_plasma->moveinfo.speed <= 0)
|
||||
ph_plasma->moveinfo.speed = 650;
|
||||
|
||||
// For SP, freeze plasma until player spawns in
|
||||
if (game.maxclients == 1)
|
||||
{
|
||||
VectorClear(plasma->velocity);
|
||||
plasma->think = plasma_delayed_start;
|
||||
plasma->nextthink = level.time + FRAMETIME;
|
||||
VectorClear(ph_plasma->velocity);
|
||||
ph_plasma->think = phalanx_plasma_delayed_start;
|
||||
ph_plasma->nextthink = level.time + FRAMETIME;
|
||||
}
|
||||
else
|
||||
{
|
||||
plasma->think = G_FreeEdict;
|
||||
plasma->nextthink = level.time + 8000/plasma->moveinfo.speed;
|
||||
ph_plasma->think = G_FreeEdict;
|
||||
ph_plasma->nextthink = level.time + 8000.0f / ph_plasma->moveinfo.speed;
|
||||
}
|
||||
gi.linkentity (plasma);
|
||||
gi.linkentity (ph_plasma);
|
||||
}
|
||||
|
||||
// RAFAEL
|
||||
|
@ -2593,7 +2518,7 @@ extern int lastgibframe;
|
|||
|
||||
// Knightmare- forget this, enough gibs are spawned already
|
||||
// Lazarus: Prevent gib showers from causing SZ_GetSpace: overflow
|
||||
/*if (level.framenum > lastgibframe)
|
||||
/* if (level.framenum > lastgibframe)
|
||||
{
|
||||
gibsthisframe = 0;
|
||||
lastgibframe = level.framenum;
|
||||
|
@ -2660,7 +2585,7 @@ extern int lastgibframe;
|
|||
//best->think = G_FreeEdict;
|
||||
best->think = gib_fade;
|
||||
gi.linkentity (best);
|
||||
}*/
|
||||
} */
|
||||
|
||||
best = G_Spawn ();
|
||||
VectorCopy (ent->s.origin, best->s.origin);
|
||||
|
|
|
@ -880,14 +880,14 @@ void actorPhalanx (edict_t *self)
|
|||
forward[YAW] -= 1.5;
|
||||
VectorNormalize (forward);
|
||||
|
||||
fire_plasma (self, start, forward, damage, 725, damage_radius, radius_damage);
|
||||
fire_phalanx_plasma (self, start, forward, damage, 725, damage_radius, radius_damage);
|
||||
}
|
||||
else
|
||||
{
|
||||
forward[YAW] += 1.5;
|
||||
VectorNormalize (forward);
|
||||
|
||||
fire_plasma (self, start, forward, damage, 725, damage_radius, radius_damage);
|
||||
fire_phalanx_plasma (self, start, forward, damage, 725, damage_radius, radius_damage);
|
||||
|
||||
gi.positioned_sound(start,self,CHAN_WEAPON,gi.soundindex("weapons/plasshot.wav"),1,ATTN_NORM,0);
|
||||
|
||||
|
|
|
@ -669,7 +669,7 @@ void brainbeta_laserbeam (edict_t *self)
|
|||
ent->enemy = self->enemy;
|
||||
ent->owner = self;
|
||||
ent->dmg = 1;
|
||||
monster_dabeam (ent);
|
||||
monster_fire_dabeam (ent);
|
||||
|
||||
// dis is me left eye
|
||||
ent = G_Spawn ();
|
||||
|
@ -685,7 +685,7 @@ void brainbeta_laserbeam (edict_t *self)
|
|||
ent->enemy = self->enemy;
|
||||
ent->owner = self;
|
||||
ent->dmg = 1;
|
||||
monster_dabeam (ent);
|
||||
monster_fire_dabeam (ent);
|
||||
}
|
||||
|
||||
void brainbeta_laserbeam_reattack (edict_t *self)
|
||||
|
|
|
@ -950,7 +950,7 @@ void fixbot_fire_laser (edict_t *self)
|
|||
ent->enemy = self->enemy;
|
||||
ent->owner = self;
|
||||
ent->dmg = -1;
|
||||
monster_dabeam (ent);
|
||||
monster_fire_dabeam (ent);
|
||||
|
||||
if (self->enemy->health > (self->enemy->mass/10))
|
||||
{
|
||||
|
|
|
@ -169,7 +169,7 @@ void gladbGun (edict_t *self)
|
|||
VectorSubtract (self->pos1, start, dir);
|
||||
VectorNormalize (dir);
|
||||
|
||||
fire_plasma (self, start, dir, 100, 725, 60, 60);
|
||||
monster_fire_phalanx (self, start, dir, 100, 725, 60, 60, MZ2_GLADIATOR_RAILGUN_1);
|
||||
}
|
||||
|
||||
void gladbGun_check (edict_t *self)
|
||||
|
|
|
@ -2078,8 +2078,7 @@ void soldierh_laserbeam (edict_t *self, int flash_index)
|
|||
|
||||
ent->dmg = 2;
|
||||
|
||||
monster_dabeam (ent);
|
||||
|
||||
monster_fire_dabeam (ent);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2661,7 +2661,7 @@ void weapon_phalanx_fire (edict_t *ent, qboolean altfire)
|
|||
v[ROLL] = ent->client->v_angle[ROLL];
|
||||
AngleVectors (v, forward, right, up);
|
||||
|
||||
fire_plasma (ent, start, forward, damage, sk_phalanx_speed->value, damage_radius, radius_damage);
|
||||
fire_phalanx_plasma (ent, start, forward, damage, sk_phalanx_speed->value, damage_radius, radius_damage);
|
||||
|
||||
if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
|
||||
ent->client->pers.inventory[ent->client->ammo_index]--;
|
||||
|
@ -2672,7 +2672,7 @@ void weapon_phalanx_fire (edict_t *ent, qboolean altfire)
|
|||
v[YAW] = ent->client->v_angle[YAW] + 1.5;
|
||||
v[ROLL] = ent->client->v_angle[ROLL];
|
||||
AngleVectors (v, forward, right, up);
|
||||
fire_plasma (ent, start, forward, damage, sk_phalanx_speed->value, damage_radius, radius_damage);
|
||||
fire_phalanx_plasma (ent, start, forward, damage, sk_phalanx_speed->value, damage_radius, radius_damage);
|
||||
|
||||
// send muzzle flash
|
||||
// Knightmare- Gen cam code
|
||||
|
|
Loading…
Reference in a new issue