Added custom animations array and enabled target_animation entity in missionpack DLL.

Added support for custom client railgun colors in missionpack DLL.
Removed sk_rail_color_* cvars from missionpack DLL.
Added CS_HUDVARIANT configstring.
Added code to set CS_HUDVARIANT configstring in game DLLs.
This commit is contained in:
Knightmare66 2021-11-11 21:32:00 -05:00
parent ec1c4c03f8
commit f829090864
36 changed files with 1582 additions and 431 deletions

View file

@ -1623,14 +1623,19 @@ void SP_worldspawn (edict_t *ent)
// status bar program
if (deathmatch->value)
//ZOID
if (ctf->value) {
{
// ZOID
if (ctf->value)
{
gi.configstring (CS_STATUSBAR, ctf_statusbar);
//precaches
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "ctf"); // use CTF HUD script variant
#endif
// precaches
gi.imageindex("sbfctf1");
gi.imageindex("sbfctf2");
// gi.imageindex("ctfsb1");
// gi.imageindex("ctfsb2");
// gi.imageindex("ctfsb1");
// gi.imageindex("ctfsb2");
gi.imageindex("i_ctf1");
gi.imageindex("i_ctf2");
gi.imageindex("i_ctf1d");
@ -1638,19 +1643,28 @@ void SP_worldspawn (edict_t *ent)
gi.imageindex("i_ctf1t");
gi.imageindex("i_ctf2t");
gi.imageindex("i_ctfj");
/* if (ctf->value == 2)
/* if (ctf->value == 2)
{
gi.modelindex("models/weapons/v_hook/tris.md2");
gi.soundindex("weapons/grapple/grhit.wav");
gi.soundindex("weapons/grapple/grpull.wav");
gi.soundindex("weapons/grapple/grfire.wav");
}*/
} else
//ZOID
gi.configstring (CS_STATUSBAR, dm_statusbar);
else
}
else {
// ZOID
gi.configstring (CS_STATUSBAR, dm_statusbar);
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "3zb2"); // use 3ZB2 HUD script variant
#endif
}
}
else {
gi.configstring (CS_STATUSBAR, single_statusbar);
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "3zb2"); // use 3ZB2 HUD script variant
#endif
}
//---------------

View file

@ -1228,7 +1228,10 @@ typedef enum
#define CS_ITEMS (CS_LIGHTS+MAX_LIGHTSTYLES)
#define CS_PLAYERSKINS (CS_ITEMS+MAX_ITEMS)
#define CS_GENERAL (CS_PLAYERSKINS+MAX_CLIENTS)
#define MAX_CONFIGSTRINGS (CS_GENERAL+MAX_GENERAL)
#define CS_HUDVARIANT (CS_GENERAL+MAX_GENERAL)
#define CS_PAKFILE (CS_HUDVARIANT+1)
#define MAX_CONFIGSTRINGS (CS_PAKFILE+1)
//#define MAX_CONFIGSTRINGS (CS_GENERAL+MAX_GENERAL)
//Knightmare- hacked configstring offsets for old demos
#define OLD_CS_SOUNDS (CS_MODELS+OLD_MAX_MODELS)

View file

@ -939,7 +939,10 @@ void SP_worldspawn(edict_t *ent)
if (sv_gametype->value == G_CTF) //CW
{
gi.configstring(CS_STATUSBAR, ctf_statusbar);
CTFPrecache();
CTFPrecache ();
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "ctf"); // use CTF HUD script variant
#endif
}
//ZOID--
@ -947,16 +950,26 @@ void SP_worldspawn(edict_t *ent)
else if (sv_gametype->value == G_TDM)
{
gi.configstring(CS_STATUSBAR, tdm_statusbar);
TDMPrecache();
TDMPrecache ();
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "ctf"); // use CTF HUD script variant
#endif
}
else if (sv_gametype->value == G_ASLT)
{
gi.configstring(CS_STATUSBAR, aslt_statusbar);
ASLTPrecache();
ASLTPrecache ();
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "awaken2_assault"); // use Awaken2 assault HUD script variant
#endif
}
else
else {
//CW--
gi.configstring(CS_STATUSBAR, dm_statusbar);
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "default"); // use DM/SP HUD script variant
#endif
}
//---------------

View file

@ -967,7 +967,8 @@ typedef enum
#define CS_ITEMS (CS_LIGHTS+MAX_LIGHTSTYLES) //1056
#define CS_PLAYERSKINS (CS_ITEMS+MAX_ITEMS) //1312
#define CS_GENERAL (CS_PLAYERSKINS+MAX_CLIENTS) //1568
#define CS_PAKFILE (CS_GENERAL+MAX_GENERAL)
#define CS_HUDVARIANT (CS_GENERAL+MAX_GENERAL)
#define CS_PAKFILE (CS_HUDVARIANT+1)
#define MAX_CONFIGSTRINGS (CS_PAKFILE+1)
//#define MAX_CONFIGSTRINGS (CS_GENERAL+MAX_GENERAL) //2080

View file

@ -39,7 +39,7 @@ void camera_off (edict_t *ent)
ent->client->spycam->flags &= ~FL_ROBOT;
if (ent->client->spycam->svflags & SVF_MONSTER)
ent->client->spycam->svflags &= ~SVF_NOCLIENT;
VectorCopy (ent->client->camplayer->s.origin, ent->s.origin);
VectorCopy(ent->client->camplayer->s.origin,ent->s.origin);
gi.TagFree(ent->client->camplayer->client);
G_FreeEdict (ent->client->camplayer);
@ -49,10 +49,10 @@ void camera_off (edict_t *ent)
for (i=0 ; i<3 ; i++)
ent->client->ps.pmove.delta_angles[i] =
ANGLE2SHORT(ent->client->org_viewangles[i] - ent->client->resp.cmd_angles[i]);
VectorCopy (ent->client->org_viewangles, ent->client->resp.cmd_angles);
VectorCopy (ent->client->org_viewangles, ent->s.angles);
VectorCopy (ent->client->org_viewangles, ent->client->ps.viewangles);
VectorCopy (ent->client->org_viewangles, ent->client->v_angle);
VectorCopy(ent->client->org_viewangles, ent->client->resp.cmd_angles);
VectorCopy(ent->client->org_viewangles, ent->s.angles);
VectorCopy(ent->client->org_viewangles, ent->client->ps.viewangles);
VectorCopy(ent->client->org_viewangles, ent->client->v_angle);
ent->client->ps.gunindex = gi.modelindex(ent->client->pers.weapon->view_model);
ent->client->ps.pmove.pm_flags &= ~PMF_NO_PREDICTION;
@ -119,7 +119,7 @@ void camera_on (edict_t *ent)
camera->viewer = ent;
// save current viewangles and restore them with camera_off
VectorCopy (ent->client->v_angle, ent->client->org_viewangles);
VectorCopy(ent->client->v_angle,ent->client->org_viewangles);
// copy over all important player data to fake player
ent->client->camplayer = G_Spawn();
@ -143,20 +143,20 @@ void camera_on (edict_t *ent)
faker->light_level = ent->light_level;
faker->think = faker_animate;
faker->nextthink = level.time + FRAMETIME;
VectorCopy (ent->mins, faker->mins);
VectorCopy (ent->maxs, faker->maxs);
VectorCopy(ent->mins,faker->mins);
VectorCopy(ent->maxs,faker->maxs);
// create a client so you can pick up items/be shot/etc while in camera
cl = (gclient_t *) gi.TagMalloc(sizeof(gclient_t), TAG_LEVEL);
memset (cl, 0, sizeof(gclient_t));
memset(cl,0,sizeof(gclient_t));
ent->client->camplayer->client = cl;
ent->client->camplayer->target_ent = ent;
gi.linkentity (faker);
AngleVectors (camera->s.angles, forward, left, up);
AngleVectors(camera->s.angles,forward,left,up);
VectorMA (camera->s.origin, camera->move_origin[0], forward, ent->s.origin);
VectorMA (ent->s.origin, -camera->move_origin[1], left, ent->s.origin);
VectorMA (ent->s.origin, camera->move_origin[2], up, ent->s.origin);
VectorMA(camera->s.origin, camera->move_origin[0],forward,ent->s.origin);
VectorMA(ent->s.origin, -camera->move_origin[1],left, ent->s.origin);
VectorMA(ent->s.origin, camera->move_origin[2],up, ent->s.origin);
ent->movetype = MOVETYPE_NOCLIP;
ent->clipmask = 0;
@ -186,7 +186,7 @@ void camera_on (edict_t *ent)
}
if (ent->client->spycam->viewmessage)
safe_centerprintf (ent, ent->client->spycam->viewmessage);
safe_centerprintf(ent,ent->client->spycam->viewmessage);
}
@ -207,15 +207,14 @@ edict_t *G_FindNextCamera (edict_t *camera, edict_t *monitor)
// or just scan through the list of entities. If count for the first camera
// in the map is 0, then we'll just use the map order.
next = G_Find(NULL, FOFS(targetname), monitor->target);
next = G_Find(NULL,FOFS(targetname),monitor->target);
if (!next) return NULL;
if (!next->count)
{
if (!next->count) {
if (camera) {
next = camera;
next++;
}
else
} else
next = g_edicts;
for ( ; next < &g_edicts[globals.num_edicts] ; next++)
@ -229,9 +228,9 @@ edict_t *G_FindNextCamera (edict_t *camera, edict_t *monitor)
if (!next->targetname)
continue;
// don't select "inactive" cameras
if ( !Q_stricmp (next->classname, "turret_breach") && (next->spawnflags & 16) )
if (!Q_stricmp (next->classname,"turret_breach") && (next->spawnflags & 16))
continue;
if ( !Q_stricmp (next->targetname, monitor->target) )
if (!Q_stricmp (next->targetname, monitor->target))
goto found_one;
}
@ -247,14 +246,12 @@ edict_t *G_FindNextCamera (edict_t *camera, edict_t *monitor)
if (!next->targetname)
continue;
// don't select "inactive" cameras
if ( !Q_stricmp (next->classname, "turret_breach") && (next->spawnflags & 16) )
if (!Q_stricmp (next->classname,"turret_breach") && (next->spawnflags & 16))
continue;
if ( !Q_stricmp (next->targetname, monitor->target ))
if (!Q_stricmp (next->targetname, monitor->target))
goto found_one;
}
}
else
{
} else {
int which, start;
if (camera) {
@ -265,23 +262,18 @@ edict_t *G_FindNextCamera (edict_t *camera, edict_t *monitor)
which = 1;
start = which;
next = g_edicts+1;
while (1)
{
if (next->targetname)
{
if ( !Q_stricmp(next->targetname, monitor->target) )
{
if (next->count == which)
{
while (1) {
if (next->targetname) {
if (!Q_stricmp(next->targetname,monitor->target)) {
if (next->count == which) {
if (!next->inuse || (next->deadflag == DEAD_DEAD) ||
( !Q_stricmp (next->classname, "turret_breach") && (next->spawnflags & 16) ) )
(!Q_stricmp (next->classname,"turret_breach") && (next->spawnflags & 16)) )
{
next = g_edicts;
which++;
if (which > monitor->count) which = 1;
if (which > monitor->count) which=1;
if (which == start) return NULL;
}
else
} else
goto found_one;
}
}
@ -321,7 +313,7 @@ edict_t *G_FindPrevCamera (edict_t *camera, edict_t *monitor)
// or just scan through the list of entities. If count for the first camera
// in the map is 0, then we'll just use the map order.
prev = G_Find(NULL, FOFS(targetname), monitor->target);
prev = G_Find(NULL,FOFS(targetname),monitor->target);
if (!prev) return NULL;
if (!prev->count)
{
@ -339,9 +331,9 @@ edict_t *G_FindPrevCamera (edict_t *camera, edict_t *monitor)
if (!prev->targetname)
continue;
// don't select "inactive" cameras
if ( !Q_stricmp (prev->classname, "turret_breach") && (prev->spawnflags & 16) )
if (!Q_stricmp (prev->classname,"turret_breach") && (prev->spawnflags & 16))
continue;
if ( !Q_stricmp (prev->targetname, monitor->target) )
if (!Q_stricmp (prev->targetname, monitor->target))
newcamera = prev;
}
goto found_one;
@ -358,23 +350,20 @@ edict_t *G_FindPrevCamera (edict_t *camera, edict_t *monitor)
which = monitor->count;
start = which;
prev = g_edicts+1;
while (1)
{
if (prev->targetname)
{
if ( !Q_stricmp(prev->targetname, monitor->target) )
{
if (prev->count == which)
{
while (1) {
if (prev->targetname) {
if (!Q_stricmp(prev->targetname,monitor->target)) {
if (prev->count == which) {
if (!prev->inuse || (prev->deadflag == DEAD_DEAD) ||
( !Q_stricmp (prev->classname, "turret_breach") && (prev->spawnflags & 16)) )
(!Q_stricmp (prev->classname,"turret_breach") && (prev->spawnflags & 16)))
{
prev = g_edicts;
which--;
if (which <= 0) which = monitor->count;
if (which <= 0) which=monitor->count;
if (which == start) return NULL;
}
else {
else
{
newcamera = prev;
goto found_one;
}
@ -407,7 +396,7 @@ void use_camera (edict_t *self, edict_t *other, edict_t *activator)
if (activator->client->spycam) // already using camera
return;
target = G_FindNextCamera(NULL, self);
target = G_FindNextCamera(NULL,self);
if (!target) return;
// if currently in thirdperson, turn that sucker off
@ -434,7 +423,7 @@ void func_monitor_init (edict_t *self)
self->count = 0;
camera = NULL;
while ( (camera = G_Find(camera, FOFS(targetname), self->target)) != NULL)
while ( (camera=G_Find(camera,FOFS(targetname),self->target)) != NULL)
self->count++;
if (!self->count)
self->s.effects = 0; // don't animate a func_monitor that has no cameras
@ -443,7 +432,7 @@ void func_monitor_init (edict_t *self)
void SP_func_monitor (edict_t *self)
{
if ( !self->target ) {
gi.dprintf("func_monitor without a target at %s\n", vtos(self->s.origin));
gi.dprintf("func_monitor without a target at %s\n",vtos(self->s.origin));
G_FreeEdict(self);
return;
}

View file

@ -2414,7 +2414,7 @@ always owned, never in the world
/* width */ 2,
60,
NULL,
IT_STAY_COOP|IT_POWERUP,
IT_POWERUP|IT_STAY_COOP,
0,
NULL,
0,
@ -2437,7 +2437,7 @@ always owned, never in the world
/* width */ 2,
60,
NULL,
IT_STAY_COOP|IT_POWERUP,
IT_POWERUP|IT_STAY_COOP,
0,
NULL,
0,

View file

@ -1698,20 +1698,32 @@ void SP_worldspawn (edict_t *ent)
// status bar program
if (deathmatch->value)
{
//ZOID
if (ctf->value) {
// ZOID
if (ctf->value)
{
if (ttctf->value) // Knightmare added
gi.configstring (CS_STATUSBAR, ttctf_statusbar);
else
gi.configstring (CS_STATUSBAR, ctf_statusbar);
CTFPrecache();
CTFPrecache ();
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "ctf"); // use CTF HUD script variant
#endif
}
else
else {
gi.configstring (CS_STATUSBAR, dm_statusbar);
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "default"); // use DM/SP HUD script variant
#endif
}
}
//ZOID
else
// ZOID
else {
gi.configstring (CS_STATUSBAR, single_statusbar);
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "default"); // use DM/SP HUD script variant
#endif
}
//---------------
// ACEBOT_ADD

View file

@ -1582,7 +1582,7 @@ void SP_misc_actor (edict_t *self)
walkmonster_start (self);
// We've built the misc_actor model to include the standard
// Q2 male skins, specified with the style key. Default = grunt
// Q2 male skins, specified with the style key. Default=grunt
self->s.skinnum = self->style;
// actors always start in a dormant state, they *must* be used to get going

View file

@ -1513,7 +1513,8 @@ ROGUE - VERSIONS
#define CS_ITEMS (CS_LIGHTS+MAX_LIGHTSTYLES)
#define CS_PLAYERSKINS (CS_ITEMS+MAX_ITEMS)
#define CS_GENERAL (CS_PLAYERSKINS+MAX_CLIENTS)
#define CS_PAKFILE (CS_GENERAL+MAX_GENERAL)
#define CS_HUDVARIANT (CS_GENERAL+MAX_GENERAL)
#define CS_PAKFILE (CS_HUDVARIANT+1)
#define MAX_CONFIGSTRINGS (CS_PAKFILE+1)
//#define MAX_CONFIGSTRINGS (CS_GENERAL+MAX_GENERAL)

View file

@ -1594,7 +1594,6 @@ extern void Trap_Think ( edict_t * ent ) ;
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 ) ;
@ -1637,12 +1636,12 @@ extern void q1_laser_touch ( edict_t * self , edict_t * other , cplane_t * plane
extern void q1_nail_precache ( void ) ;
extern void q1_fire_nail ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , qboolean sng ) ;
extern void q1_nail_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
extern void SP_goop ( edict_t * goop ) ;
extern void goop_delayed_start ( edict_t * goop ) ;
extern void SP_plasmaball ( edict_t * plasmaball ) ;
extern void plasmaball_delayed_start ( edict_t * plasmaball ) ;
extern void fire_plasma_rifle ( edict_t * ent , vec3_t start , vec3_t dir , int damage , int speed , qboolean spread ) ;
extern void fire_plasma_rifle_spread ( edict_t * ent , vec3_t start , vec3_t dir , int damage , int speed ) ;
extern void fire_plasma_rifle_bounce ( edict_t * ent , vec3_t start , vec3_t dir , int damage , int speed ) ;
extern edict_t * Spawn_Goop ( edict_t * ent , vec3_t start ) ;
extern edict_t * Spawn_Plasmaball ( edict_t * ent , vec3_t start ) ;
extern void plasma_rifle_spread_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
extern void plasma_rifle_bounce_touch ( edict_t * self , edict_t * other , cplane_t * plane , csurface_t * surf ) ;
extern void fire_nbomb ( edict_t * self , vec3_t start , vec3_t aimdir , int speed ) ;
@ -1739,6 +1738,7 @@ extern void G_TouchTriggers ( edict_t * ent ) ;
extern void G_FreeEdict ( edict_t * ed ) ;
extern edict_t * G_Spawn ( void ) ;
extern void G_InitEdict ( edict_t * e ) ;
extern mmove_t * G_NewCustomAnim ( void ) ;
extern char * G_CopyString ( char * in ) ;
extern void vectoangles2 ( vec3_t value1 , vec3_t angles ) ;
extern void vectoangles ( vec3_t value1 , vec3_t angles ) ;
@ -2016,9 +2016,9 @@ extern void sphere_fly ( edict_t * self ) ;
extern void sphere_if_idle_die ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
extern void sphere_explode ( edict_t * self , edict_t * inflictor , edict_t * attacker , int damage , vec3_t point ) ;
extern void sphere_think_explode ( edict_t * self ) ;
extern void Cmd_ToggleHud ( ) ;
extern void Hud_Off ( ) ;
extern void Hud_On ( ) ;
extern void Cmd_ToggleHud ( void ) ;
extern void Hud_Off ( void ) ;
extern void Hud_On ( void ) ;
extern void Widowlegs_Spawn ( vec3_t startpos , vec3_t angles ) ;
extern void widowlegs_think ( edict_t * self ) ;
extern void SpawnGrow_Spawn ( vec3_t startpos , int size ) ;
@ -2292,10 +2292,10 @@ extern void monster_fire_flechette ( edict_t * self , vec3_t start , vec3_t dir
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_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_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_ionripper ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , int flashtype , int effect ) ;
extern void monster_fire_blueblaster ( edict_t * self , vec3_t start , vec3_t dir , int damage , int speed , int flashtype , int effect ) ;
extern void monster_fire_bfg ( edict_t * self , vec3_t start , vec3_t aimdir , int damage , int speed , int kick , float damage_radius , int flashtype ) ;

View file

@ -1594,7 +1594,6 @@
{"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},
@ -1637,12 +1636,12 @@
{"q1_nail_precache", (byte *)q1_nail_precache},
{"q1_fire_nail", (byte *)q1_fire_nail},
{"q1_nail_touch", (byte *)q1_nail_touch},
{"SP_goop", (byte *)SP_goop},
{"goop_delayed_start", (byte *)goop_delayed_start},
{"SP_plasmaball", (byte *)SP_plasmaball},
{"plasmaball_delayed_start", (byte *)plasmaball_delayed_start},
{"fire_plasma_rifle", (byte *)fire_plasma_rifle},
{"fire_plasma_rifle_spread", (byte *)fire_plasma_rifle_spread},
{"fire_plasma_rifle_bounce", (byte *)fire_plasma_rifle_bounce},
{"Spawn_Goop", (byte *)Spawn_Goop},
{"Spawn_Plasmaball", (byte *)Spawn_Plasmaball},
{"plasma_rifle_spread_touch", (byte *)plasma_rifle_spread_touch},
{"plasma_rifle_bounce_touch", (byte *)plasma_rifle_bounce_touch},
{"fire_nbomb", (byte *)fire_nbomb},
@ -1739,6 +1738,7 @@
{"G_FreeEdict", (byte *)G_FreeEdict},
{"G_Spawn", (byte *)G_Spawn},
{"G_InitEdict", (byte *)G_InitEdict},
{"G_NewCustomAnim", (byte *)G_NewCustomAnim},
{"G_CopyString", (byte *)G_CopyString},
{"vectoangles2", (byte *)vectoangles2},
{"vectoangles", (byte *)vectoangles},
@ -2292,10 +2292,10 @@
{"monster_fire_heat", (byte *)monster_fire_heat},
{"monster_fire_tracker", (byte *)monster_fire_tracker},
{"monster_fire_blaster2", (byte *)monster_fire_blaster2},
{"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_phalanx", (byte *)monster_fire_phalanx},
{"monster_fire_ionripper", (byte *)monster_fire_ionripper},
{"monster_fire_blueblaster", (byte *)monster_fire_blueblaster},
{"monster_fire_bfg", (byte *)monster_fire_bfg},

View file

@ -2990,7 +2990,6 @@ gitem_t itemlist[] =
// 22
/*QUAKED weapon_boomer (.3 .3 1) (-16 -16 -16) (16 16 16)
*/
{
"weapon_boomer",
Pickup_Weapon,
@ -3016,7 +3015,31 @@ gitem_t itemlist[] =
#endif
},
// 23
// 23 SKWiD MOD
/*QUAKED weapon_plasma (.3 .3 1) (-16 -16 -16) (16 16 16) TRIGGER_SPAWN
*/
{
"weapon_plasma",
Pickup_Weapon,
Use_Weapon,
Drop_Weapon,
Weapon_Plasma_Rifle,
"misc/w_pkup.wav",
PLASMA_MODEL_WORLD, 0, EF_ROTATE,
PLASMA_MODEL_VIEW,
"w_plasma", // icon
PLASMA_PICKUP_NAME, // pickup
0,
PLASMA_CELLS_PER_SHOT, // bat - was 1
"Cells",
IT_WEAPON|IT_STAY_COOP|IT_LM,
WEAP_PLASMARIFLE,
NULL,
0,
"PLASMA_PRECACHE"
},
// 24
/*QUAKED weapon_railgun (.3 .3 1) (-16 -16 -16) (16 16 16) TRIGGER_SPAWN
*/
{
@ -3040,7 +3063,7 @@ gitem_t itemlist[] =
"weapons/rg_hum.wav weapons/railgf1a.wav" // precache
},
// 24
// 25
/*QUAKED weapon_phalanx (.3 .3 1) (-16 -16 -16) (16 16 16)
*/
@ -3069,7 +3092,7 @@ gitem_t itemlist[] =
#endif
},
// 25
// 26
/*QUAKED weapon_bfg (.3 .3 1) (-16 -16 -16) (16 16 16) TRIGGER_SPAWN
*/
{
@ -3093,7 +3116,7 @@ gitem_t itemlist[] =
"sprites/s_bfg1.sp2 sprites/s_bfg2.sp2 sprites/s_bfg3.sp2 weapons/bfg__f1y.wav weapons/bfg__l1a.wav weapons/bfg__x1b.wav weapons/bfg_hum.wav" // precache
},
// 26
// 27
/*QUAKED weapon_disintegrator (.3 .3 1) (-16 -16 -16) (16 16 16) TRIGGER_SPAWN
*/
{
@ -3117,7 +3140,7 @@ gitem_t itemlist[] =
"models/items/spawngro/tris.md2 models/proj/disintegrator/tris.md2 weapons/disrupt.wav weapons/disint2.wav weapons/disrupthit.wav", // precaches
},
// 27
// 28
/*QUAKED weapon_chainfist (.3 .3 1) (-16 -16 -16) (16 16 16) TRIGGER_SPAWN
*/
{
@ -3141,7 +3164,7 @@ gitem_t itemlist[] =
"weapons/sawidle.wav weapons/sawhit.wav", // precaches
},
// 28
// 29
/*QUAKED weapon_shockwave (.3 .3 1) (-16 -16 -16) (16 16 16) TRIGGER_SPAWN
*/
{
@ -3169,30 +3192,6 @@ gitem_t itemlist[] =
#endif
},
// 29 SKWiD MOD
/*QUAKED weapon_plasma (.3 .3 1) (-16 -16 -16) (16 16 16) TRIGGER_SPAWN
*/
{
"weapon_plasma",
Pickup_Weapon,
Use_Weapon,
Drop_Weapon,
Weapon_Plasma_Rifle,
"misc/w_pkup.wav",
PLASMA_MODEL_WORLD, 0, EF_ROTATE,
PLASMA_MODEL_VIEW,
"w_plasma", // icon
PLASMA_PICKUP_NAME, // pickup
0,
PLASMA_CELLS_PER_SHOT, // bat - was 1
"Cells",
IT_WEAPON|IT_STAY_COOP|IT_LM,
WEAP_PLASMARIFLE,
NULL,
0,
"PLASMA_PRECACHE"
},
// 30
/*QUAKED weapon_hml (.3 .3 1) (-16 -16 -16) (16 16 16)
*/
@ -3820,7 +3819,7 @@ model="models/items/ammo/fuel/medium/"
2, // width
60,
NULL,
IT_STAY_COOP|IT_POWERUP,
IT_POWERUP|IT_STAY_COOP,
0,
NULL,
0,
@ -3844,7 +3843,7 @@ model="models/items/ammo/fuel/medium/"
2, // width
60,
NULL,
IT_STAY_COOP|IT_POWERUP,
IT_POWERUP|IT_STAY_COOP,
0,
NULL,
0,
@ -3893,7 +3892,7 @@ gives +1 to maximum health
1, // width
30,
"Cells",
IT_STAY_COOP|IT_POWERUP|IT_ZAERO,
IT_POWERUP|IT_STAY_COOP|IT_ZAERO,
0,
NULL,
0,

View file

@ -578,6 +578,7 @@ typedef struct
int freezeframes;
int next_skill;
int num_reflectors;
int num_custom_anims; // Knightmare- custom anim counter
qboolean intermission_letterbox; // Knightmare- letterboxing
// end Lazarus
@ -1206,7 +1207,7 @@ edict_t *G_PickTarget (char *targetname);
void G_UseTargets (edict_t *ent, edict_t *activator);
void G_SetMovedir (vec3_t angles, vec3_t movedir);
void G_SetMovedir2 (vec3_t angles, vec3_t movedir);
mmove_t *G_NewCustomAnim (void); // Knightmare- util func for custom anims
void G_InitEdict (edict_t *e);
edict_t *G_Spawn (void);
void G_FreeEdict (edict_t *e);
@ -1490,12 +1491,12 @@ qboolean fire_hit (edict_t *self, vec3_t aim, int damage, int kick);
void fire_bullet (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int mod);
void fire_shotgun (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, int hspread, int vspread, int count, int mod);
void fire_blaster (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, int effect, qboolean hyper, int color);
void Grenade_Explode (edict_t *ent);
void fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius, qboolean contact);
void fire_grenade2 (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int speed, float timer, float damage_radius, qboolean held);
void rocket_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf);
void fire_rail (edict_t *self, vec3_t start, vec3_t aimdir, int damage, int kick, qboolean useColor, int red, int green, int blue);
void fire_bfg (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius);
void Grenade_Explode (edict_t *ent);
void rocket_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf);
void fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage, edict_t *home_target);
// Knightmare added
void fire_missile (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage, edict_t *home_target);
@ -1908,24 +1909,34 @@ void G_FindTeams();
void Cmd_ToggleHud ();
void Hud_On();
void Hud_Off();
//
// g_svcmds.c
//
void ServerCommand (void);
qboolean SV_FilterPacket (char *from);
//
// g_target_laz.c
//
extern mmove_t g_custom_anims[MAX_CUSTOM_ANIMS];
//
// g_thing.c
//
edict_t *SpawnThing();
//
// g_tracktrain.c
//
void tracktrain_disengage (edict_t *train);
//
// g_turret.c
//
void turret_breach_fire(edict_t *ent);
void turret_disengage (edict_t *ent);
//
// g_trigger.c
//
@ -2033,8 +2044,6 @@ typedef struct
int max_fuel;
int max_homing_rockets;
// int max_armor; // KM
qboolean spawn_landmark;
qboolean spawn_levelchange;
vec3_t spawn_offset;
@ -2056,6 +2065,10 @@ typedef struct
float visorFrames;
// end Zaero
// Custom client colors
color_t color1;
color_t color2;
} client_persistant_t;
// client data that stays across deathmatch respawns

View file

@ -687,7 +687,7 @@ extern mmove_t actor_move_flipoff ;
extern mmove_t actor_move_pain3 ;
extern mmove_t actor_move_pain2 ;
extern mmove_t actor_move_pain1 ;
extern mmove_t mmove_reloc ;
extern mmove_t g_custom_anims[1024] ;
extern mmove_t actor_move_walk_back ;
extern mmove_t actor_move_walk ;
extern mmove_t actor_move_stand ;

File diff suppressed because it is too large Load diff

View file

@ -373,6 +373,34 @@ void monster_fire_ionripper (edict_t *self, vec3_t start, vec3_t dir, int damage
gi.multicast (start, MULTICAST_PVS);
}
// 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);
// Sends new MZ2_GLADBETA_PHALANX_1 for KMQ2 builds, or MZ2_GLADIATOR_RAILGUN_1 for non-KMQ2
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
#ifdef KMQUAKE2_ENGINE_MOD
if (flashtype >= MZ2_SEND_SHORT) {
gi.WriteByte (MZ2_SEND_SHORT);
gi.WriteShort (flashtype);
gi.WriteByte (0);
}
else
#endif
gi.WriteByte (flashtype);
gi.multicast (start, MULTICAST_PVS);
}
// RAFAEL
void monster_fire_rocket_heat (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, int flashtype)
{
@ -510,34 +538,6 @@ void monster_fire_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);
// Sends new MZ2_GLADBETA_PHALANX_1 for KMQ2 builds, or MZ2_GLADIATOR_RAILGUN_1 for non-KMQ2
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
#ifdef KMQUAKE2_ENGINE_MOD
if (flashtype >= MZ2_SEND_SHORT) {
gi.WriteByte (MZ2_SEND_SHORT);
gi.WriteShort (flashtype);
gi.WriteByte (0);
}
else
#endif
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)
{

View file

@ -37,4 +37,4 @@ void VerifyTarget (edict_t *self)
self->think = NULL;
self->nextthink = 0;
}
}

View file

@ -10,7 +10,9 @@
void ChasecamRemove (edict_t *ent);
void ChasecamStart (edict_t *ent);
#ifndef SAVEGAME_USE_FUNCTION_TABLE
mmove_t mmove_reloc;
#endif
field_t fields[] = {
{"classname", FOFS(classname), F_LSTRING},
@ -1161,7 +1163,7 @@ All pointer variables (except function pointers) must be handled specially.
*/
void WriteLevelLocals (FILE *f)
{
field_t *field;
field_t *field;
level_locals_t temp;
// all of the ints, floats, and vectors stay as they are
@ -1240,7 +1242,7 @@ void WriteLevel (char *filename)
FILE *f;
void *base;
if(developer->value)
if (developer->value)
gi.dprintf ("==== WriteLevel ====\n");
f = fopen (filename, "wb");
@ -1258,6 +1260,14 @@ void WriteLevel (char *filename)
// write out level_locals_t
WriteLevelLocals (f);
// Knightmare added
// write out custom animations
for (i=0; i<MAX_CUSTOM_ANIMS; i++)
{
fwrite (&g_custom_anims[i], sizeof(g_custom_anims[i]), 1, f);
}
// end Knightmare
// write out all the entities
for (i=0; i<globals.num_edicts; i++)
{
@ -1371,6 +1381,14 @@ void ReadLevel (char *filename)
// load the level locals
ReadLevelLocals (f);
// Knightmare added
// load custom animations
for (i=0; i<MAX_CUSTOM_ANIMS; i++)
{
fread (&g_custom_anims[i], sizeof(g_custom_anims[i]), 1, f);
}
// end Knightmare
// load all the entities
while (1)
{

View file

@ -69,6 +69,7 @@ void SP_target_crosslevel_target (edict_t *ent);
void SP_target_laser (edict_t *self);
void SP_target_help (edict_t *ent);
void SP_target_actor (edict_t *ent);
void SP_target_animation (edict_t *self);
void SP_target_lightramp (edict_t *self);
void SP_target_earthquake (edict_t *ent);
void SP_target_character (edict_t *ent);
@ -366,7 +367,7 @@ void SP_tesla (edict_t *self);
void SP_trap (edict_t *self);
void SP_rocket (edict_t *self);
void SP_missile (edict_t *self);
void SP_goop (edict_t *self); // SKWiD MOD
void SP_plasmaball (edict_t *self); // SKWiD MOD
//
// end Lazarus
@ -436,6 +437,7 @@ spawn_t spawns[] = {
{"target_laser", SP_target_laser},
{"target_help", SP_target_help},
{"target_actor", SP_target_actor},
{"target_animation", SP_target_animation},
{"target_lightramp", SP_target_lightramp},
{"target_earthquake", SP_target_earthquake},
{"target_character", SP_target_character},
@ -766,7 +768,7 @@ spawn_t spawns[] = {
{"homing rocket", SP_rocket},
{"missile", SP_missile},
{"homing rocket", SP_missile},
{"goop", SP_goop}, // SKWiD MOD
{"plasmaball", SP_plasmaball}, // SKWiD MOD
// end Lazarus
{NULL, NULL}
@ -1636,6 +1638,7 @@ void SpawnEntities (char *mapname, char *entities, char *spawnpoint)
gi.FreeTags (TAG_LEVEL);
memset (&level, 0, sizeof(level));
memset (g_custom_anims, 0, sizeof(g_custom_anims)); // Knightmare- wipe custom animations
memset (g_edicts, 0, game.maxentities * sizeof (g_edicts[0]));
// Lazarus: these are used to track model and sound indices
@ -2165,6 +2168,10 @@ void SP_worldspawn (edict_t *ent)
else
gi.configstring (CS_STATUSBAR, single_statusbar);
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "default"); // use DM/SP HUD script variant
#endif
//---------------
@ -2972,7 +2979,7 @@ void Widowlegs_Spawn (vec3_t startpos, vec3_t angles)
int nohud = 0;
void Hud_On()
void Hud_On (void)
{
if (deathmatch->value)
gi.configstring (CS_STATUSBAR, dm_statusbar);
@ -2981,13 +2988,13 @@ void Hud_On()
nohud = 0;
}
void Hud_Off()
void Hud_Off (void)
{
gi.configstring (CS_STATUSBAR, NULL);
nohud = 1;
}
void Cmd_ToggleHud ()
void Cmd_ToggleHud (void)
{
if (deathmatch->value)
return;
@ -2995,4 +3002,4 @@ void Cmd_ToggleHud ()
Hud_On();
else
Hud_Off();
}
}

View file

@ -717,7 +717,7 @@ void use_target_blaster (edict_t *self, edict_t *other, edict_t *activator)
}
}
else
{ //Knightmare- set movedir here, allowing angles to be updated by movewith code
{ // Knightmare- set movedir here, allowing angles to be updated by movewith code
G_SetMovedir2 (self->s.angles, self->movedir);
VectorCopy(self->movedir,movedir);
}

View file

@ -2768,6 +2768,9 @@ void SP_target_monitor (edict_t *self)
"message" - specifies allowable classname to animate. This prevents
animating entities with inapplicable frame numbers
=====================================================================================*/
mmove_t g_custom_anims[MAX_CUSTOM_ANIMS]; // array of custom anins, saved to level file
void target_animate (edict_t *ent)
{
if ( (ent->s.frame < ent->monsterinfo.currentmove->firstframe) ||
@ -2817,7 +2820,7 @@ void target_animation_use (edict_t *self, edict_t *other, edict_t *activator)
{
if (!self->target)
return;
target = G_Find(NULL,FOFS(targetname),self->target);
target = G_Find(NULL, FOFS(targetname), self->target);
if (!target)
return;
}
@ -2845,7 +2848,7 @@ void target_animation_use (edict_t *self, edict_t *other, edict_t *activator)
void SP_target_animation (edict_t *self)
{
#if 1
#if 0
gi.dprintf("Target_animation is currently not implemented.\n");
G_FreeEdict(self);
return;
@ -2896,7 +2899,14 @@ void SP_target_animation (edict_t *self)
self->framenumbers = 1;
}
self->use = target_animation_use;
move = gi.TagMalloc(sizeof(mmove_t), TAG_LEVEL);
// move = gi.TagMalloc(sizeof(mmove_t), TAG_LEVEL);
move = G_NewCustomAnim();
if (!move) {
gi.dprintf("target_animation: no more custom anims available!\n");
G_FreeEdict(self);
return;
}
self->monsterinfo.currentmove = move;
#endif
}

View file

@ -619,6 +619,22 @@ char *G_CopyString (char *in)
return out;
}
// Knightmare added
mmove_t *G_NewCustomAnim (void)
{
int idx = 0;
if (level.num_custom_anims < MAX_CUSTOM_ANIMS) {
idx = level.num_custom_anims;
level.num_custom_anims++;
return &g_custom_anims[idx];
}
else {
// gi.dprintf ("G_NewCustomAnimIndex: no more custom anims available!\n");
return NULL;
}
}
// end Knightmare
void G_InitEdict (edict_t *e)
{

View file

@ -92,8 +92,8 @@ void plasma_rifle_spread_touch (edict_t *self, edict_t *other, cplane_t *plane,
return;
}
// Don't collide with other plasma goops
if ( Q_stricmp(other->classname, "goop") == 0 )
// Don't collide with other plasma balls
if ( Q_stricmp(other->classname, "plasmaball") == 0 )
return;
if ( self->owner->client )
@ -137,45 +137,45 @@ void plasma_rifle_spread_touch (edict_t *self, edict_t *other, cplane_t *plane,
/*
==============================================================================
Spawn_Goop
Spawn_Plasmaball
Spawns the plasma entities, and defines values global to both weapon modes.
==============================================================================
*/
edict_t *Spawn_Goop (edict_t *ent, vec3_t start)
edict_t *Spawn_Plasmaball (edict_t *ent, vec3_t start)
{
edict_t *goop; // = G_Spawn();
edict_t *plasmaball; // = G_Spawn();
// sanity check
if (!ent) {
return NULL;
}
goop = G_Spawn();
plasmaball = G_Spawn();
goop->owner = ent;
goop->clipmask = MASK_SHOT;
goop->solid = SOLID_BBOX;
goop->svflags = SVF_DEADMONSTER;
plasmaball->owner = ent;
plasmaball->clipmask = MASK_SHOT;
plasmaball->solid = SOLID_BBOX;
plasmaball->svflags = SVF_DEADMONSTER;
VectorCopy (start, goop->s.origin);
goop->classname = "goop";
goop->class_id = ENTITY_GOOP;
VectorCopy (start, plasmaball->s.origin);
plasmaball->classname = "plasmaball";
plasmaball->class_id = ENTITY_PLASMABALL;
goop->s.effects |= EF_BLUEHYPERBLASTER | EF_ANIM_ALLFAST;
plasmaball->s.effects |= EF_BLUEHYPERBLASTER | EF_ANIM_ALLFAST;
// bat to get rid of the blue flag effect
// goop->s.effects |= EF_IONRIPPER | EF_ANIM_ALLFAST;
goop->s.renderfx = RF_TRANSLUCENT;
goop->s.modelindex = gi.modelindex(PLASMA_SPRITE_FLY);
goop->s.sound = gi.soundindex(PLASMA_SOUND_FLYBY);
// plasmaball->s.effects |= EF_IONRIPPER | EF_ANIM_ALLFAST;
plasmaball->s.renderfx = RF_TRANSLUCENT;
plasmaball->s.modelindex = gi.modelindex(PLASMA_SPRITE_FLY);
plasmaball->s.sound = gi.soundindex(PLASMA_SOUND_FLYBY);
// give it some thickness for the bounce
// VectorSet (goop->mins, -12, -12, -12);
// VectorSet (goop->maxs, 12, 12, 12);
VectorSet (goop->mins, -6, -6, -6);
VectorSet (goop->maxs, 6, 6, 6);
// VectorSet (plasmaball->mins, -12, -12, -12);
// VectorSet (plasmaball->maxs, 12, 12, 12);
VectorSet (plasmaball->mins, -6, -6, -6);
VectorSet (plasmaball->maxs, 6, 6, 6);
return goop;
return plasmaball;
}
@ -189,37 +189,37 @@ Uses MOVETYPE_WALLBOUNCE.
*/
void fire_plasma_rifle_bounce (edict_t *ent, vec3_t start, vec3_t dir, int damage, int speed)
{
edict_t *goop = NULL;
edict_t *plasmaball = NULL;
// sanity check
if (!ent) {
return;
}
goop = Spawn_Goop (ent, start);
if (!goop) {
plasmaball = Spawn_Plasmaball (ent, start);
if (!plasmaball) {
return;
}
goop->movetype = MOVETYPE_WALLBOUNCE; // Knightmare- use same movetype as ION Ripper projectiles
plasmaball->movetype = MOVETYPE_WALLBOUNCE; // Knightmare- use same movetype as ION Ripper projectiles
VectorScale (dir, speed, goop->velocity); // Knightmare- use parm speed
VectorCopy (goop->velocity, goop->s.angles); // needed for post touch
VectorScale (dir, speed, plasmaball->velocity); // Knightmare- use parm speed
VectorCopy (plasmaball->velocity, plasmaball->s.angles); // needed for post touch
//-bat
goop->dmg = damage; // Knightmare- use parm damage
goop->touch = plasma_rifle_bounce_touch;
plasmaball->dmg = damage; // Knightmare- use parm damage
plasmaball->touch = plasma_rifle_bounce_touch;
goop->think = G_FreeEdict; // change this to handle
// goop->nextthink = level.time + 3.0; // sprite animation?
// goop->nextthink = level.time + 1.5;
goop->nextthink = level.time + sk_plasma_rifle_life_bounce->value;
plasmaball->think = G_FreeEdict; // change this to handle
// plasmaball->nextthink = level.time + 3.0; // sprite animation?
// plasmaball->nextthink = level.time + 1.5;
plasmaball->nextthink = level.time + sk_plasma_rifle_life_bounce->value;
gi.linkentity (goop);
gi.linkentity (plasmaball);
// Knightmare- added missing check_dodge() call
if (ent->client)
check_dodge (ent, goop->s.origin, dir, speed);
check_dodge (ent, plasmaball->s.origin, dir, speed);
}
@ -233,9 +233,9 @@ one initial bouncy bullet.
*/
void fire_plasma_rifle_spread (edict_t *ent, vec3_t start, vec3_t dir, int damage, int speed)
{
edict_t *goop_l = NULL;
edict_t *goop_c = NULL;
edict_t *goop_r = NULL;
edict_t *plasmaball_l = NULL;
edict_t *plasmaball_c = NULL;
edict_t *plasmaball_r = NULL;
vec3_t dir_r, dir_l, angles;
// sanity check
@ -243,66 +243,66 @@ void fire_plasma_rifle_spread (edict_t *ent, vec3_t start, vec3_t dir, int damag
return;
}
goop_l = Spawn_Goop (ent, start);
goop_c = Spawn_Goop (ent, start);
goop_r = Spawn_Goop (ent, start);
if (!goop_l || !goop_c || !goop_r) {
plasmaball_l = Spawn_Plasmaball (ent, start);
plasmaball_c = Spawn_Plasmaball (ent, start);
plasmaball_r = Spawn_Plasmaball (ent, start);
if (!plasmaball_l || !plasmaball_c || !plasmaball_r) {
return;
}
goop_l->movetype = MOVETYPE_FLYMISSILE;
goop_c->movetype = MOVETYPE_FLYMISSILE;
goop_r->movetype = MOVETYPE_FLYMISSILE;
plasmaball_l->movetype = MOVETYPE_FLYMISSILE;
plasmaball_c->movetype = MOVETYPE_FLYMISSILE;
plasmaball_r->movetype = MOVETYPE_FLYMISSILE;
VectorClear (goop_l->mins);
VectorClear (goop_l->maxs);
VectorClear (goop_c->mins);
VectorClear (goop_c->maxs);
VectorClear (goop_r->mins);
VectorClear (goop_r->maxs);
VectorClear (plasmaball_l->mins);
VectorClear (plasmaball_l->maxs);
VectorClear (plasmaball_c->mins);
VectorClear (plasmaball_c->maxs);
VectorClear (plasmaball_r->mins);
VectorClear (plasmaball_r->maxs);
// Knightmare- use parm damage
goop_l->dmg = damage;
goop_c->dmg = damage;
goop_r->dmg = damage;
plasmaball_l->dmg = damage;
plasmaball_c->dmg = damage;
plasmaball_r->dmg = damage;
// center spread, line of sight
VectorScale (dir, speed, goop_c->velocity); // Knightmare- use parm speed
VectorScale (dir, speed, plasmaball_c->velocity); // Knightmare- use parm speed
vectoangles (dir, angles);
// right spread, has 10+ in yaw
angles[YAW] -= 10;
AngleVectors (angles, dir_r, NULL, NULL);
VectorScale (dir_r, speed, goop_r->velocity); // Knightmare- use parm speed
VectorScale (dir_r, speed, plasmaball_r->velocity); // Knightmare- use parm speed
// left spread, has 10- in yaw
angles[YAW] += 20;
AngleVectors (angles, dir_l, NULL, NULL);
VectorScale (dir_l, speed, goop_l->velocity); // Knightmare- use parm speed
VectorScale (dir_l, speed, plasmaball_l->velocity); // Knightmare- use parm speed
goop_l->touch = plasma_rifle_spread_touch;
goop_c->touch = plasma_rifle_spread_touch;
goop_r->touch = plasma_rifle_spread_touch;
plasmaball_l->touch = plasma_rifle_spread_touch;
plasmaball_c->touch = plasma_rifle_spread_touch;
plasmaball_r->touch = plasma_rifle_spread_touch;
goop_l->think = G_FreeEdict;
goop_c->think = G_FreeEdict;
goop_r->think = G_FreeEdict;
// goop_l->nextthink = level.time + 3.0;
// goop_c->nextthink = level.time + 3.0;
// goop_r->nextthink = level.time + 3.0;
goop_l->nextthink = level.time + sk_plasma_rifle_life_spread->value;
goop_c->nextthink = level.time + sk_plasma_rifle_life_spread->value;
goop_r->nextthink = level.time + sk_plasma_rifle_life_spread->value;
plasmaball_l->think = G_FreeEdict;
plasmaball_c->think = G_FreeEdict;
plasmaball_r->think = G_FreeEdict;
// plasmaball_l->nextthink = level.time + 3.0;
// plasmaball_c->nextthink = level.time + 3.0;
// plasmaball_r->nextthink = level.time + 3.0;
plasmaball_l->nextthink = level.time + sk_plasma_rifle_life_spread->value;
plasmaball_c->nextthink = level.time + sk_plasma_rifle_life_spread->value;
plasmaball_r->nextthink = level.time + sk_plasma_rifle_life_spread->value;
gi.linkentity (goop_l);
gi.linkentity (goop_c);
gi.linkentity (goop_r);
gi.linkentity (plasmaball_l);
gi.linkentity (plasmaball_c);
gi.linkentity (plasmaball_r);
// Knightmare- added missing check_dodge() calls
if (ent->client) {
check_dodge (ent, goop_c->s.origin, dir, speed);
check_dodge (ent, goop_r->s.origin, dir_r, speed);
check_dodge (ent, goop_l->s.origin, dir_l, speed);
check_dodge (ent, plasmaball_c->s.origin, dir, speed);
check_dodge (ent, plasmaball_r->s.origin, dir_r, speed);
check_dodge (ent, plasmaball_l->s.origin, dir_l, speed);
}
}
@ -326,50 +326,50 @@ void fire_plasma_rifle (edict_t *ent, vec3_t start, vec3_t dir, int damage, int
}
}
// NOTE: SP_goop should ONLY be used to spawn plasma rifle shots that change maps
// NOTE: SP_plasmaball should ONLY be used to spawn plasma rifle shots that change maps
// via a trigger_transition. It should NOT be used for map entities.
void goop_delayed_start (edict_t *goop)
void plasmaball_delayed_start (edict_t *plasmaball)
{
if (g_edicts[1].linkcount)
{
VectorScale(goop->movedir, goop->moveinfo.speed, goop->velocity);
goop->nextthink = level.time + 8000/goop->moveinfo.speed;
goop->think = G_FreeEdict;
gi.linkentity(goop);
VectorScale(plasmaball->movedir, plasmaball->moveinfo.speed, plasmaball->velocity);
plasmaball->nextthink = level.time + 8000/plasmaball->moveinfo.speed;
plasmaball->think = G_FreeEdict;
gi.linkentity(plasmaball);
}
else
goop->nextthink = level.time + FRAMETIME;
plasmaball->nextthink = level.time + FRAMETIME;
}
void SP_goop (edict_t *goop)
void SP_plasmaball (edict_t *plasmaball)
{
vec3_t dir;
goop->s.modelindex = gi.modelindex(PLASMA_SPRITE_FLY);
goop->s.effects |= EF_BLUEHYPERBLASTER | EF_ANIM_ALLFAST;
goop->s.sound = gi.soundindex(PLASMA_SOUND_FLYBY);
plasmaball->s.modelindex = gi.modelindex(PLASMA_SPRITE_FLY);
plasmaball->s.effects |= EF_BLUEHYPERBLASTER | EF_ANIM_ALLFAST;
plasmaball->s.sound = gi.soundindex(PLASMA_SOUND_FLYBY);
// set to the spread variant as we don't need a high speed bouncing projectile just after a map transition
goop->touch = plasma_rifle_spread_touch;
AngleVectors(goop->s.angles, dir, NULL, NULL);
VectorCopy (dir, goop->movedir);
goop->moveinfo.speed = VectorLength(goop->velocity);
if (goop->moveinfo.speed <= 0)
goop->moveinfo.speed = sk_plasma_rifle_speed_spread->value; // 1200
plasmaball->touch = plasma_rifle_spread_touch;
AngleVectors(plasmaball->s.angles, dir, NULL, NULL);
VectorCopy (dir, plasmaball->movedir);
plasmaball->moveinfo.speed = VectorLength(plasmaball->velocity);
if (plasmaball->moveinfo.speed <= 0)
plasmaball->moveinfo.speed = sk_plasma_rifle_speed_spread->value; // 1200
// For SP, freeze goop until player spawns in
// For SP, freeze plasmaball until player spawns in
if (game.maxclients == 1)
{
VectorClear(goop->velocity);
goop->think = goop_delayed_start;
goop->nextthink = level.time + FRAMETIME;
VectorClear(plasmaball->velocity);
plasmaball->think = plasmaball_delayed_start;
plasmaball->nextthink = level.time + FRAMETIME;
}
else
{
goop->think = G_FreeEdict;
goop->nextthink = level.time + 8000/goop->moveinfo.speed;
plasmaball->think = G_FreeEdict;
plasmaball->nextthink = level.time + 8000/plasmaball->moveinfo.speed;
}
gi.linkentity (goop);
gi.linkentity (plasmaball);
}
// end M82 Plasma Rifle

View file

@ -18,8 +18,10 @@ void ionripper_sparks (edict_t *self)
color = 0xe4 + (rand()&3);
// Knightmare- explode sound
#ifdef KMQUAKE2_ENGINE_MOD
if (sk_ionripper_extra_sounds->value)
gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex ("weapons/ionexp.wav"), 1, ATTN_NONE, 0);
#endif
gi.WriteByte (svc_temp_entity);
gi.WriteByte (TE_WELDING_SPARKS);
@ -54,8 +56,8 @@ void ionripper_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t
if (other->takedamage)
{
// Knightmare- hit sound
if (sk_ionripper_extra_sounds->value)
#ifdef KMQUAKE2_ENGINE_MOD
if (sk_ionripper_extra_sounds->value)
{
float r = random();
if (r < 0.3333)
@ -65,8 +67,6 @@ void ionripper_touch (edict_t *self, edict_t *other, cplane_t *plane, csurface_t
else
gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex ("weapons/ionhit3.wav"), 1, ATTN_NONE, 0);
}
#else
gi.sound (self, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex ("weapons/ionhit1.wav"), 1, ATTN_NONE, 0);
#endif
T_Damage (other, self, self->owner, self->velocity, self->s.origin, plane->normal, self->dmg, 1, DAMAGE_ENERGY, MOD_RIPPER);
}
@ -325,13 +325,6 @@ void phalanx_plasma_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurfa
}
// Knightmare- remove this after the next savegame version increment!
void plasma_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
{
phalanx_plasma_touch (ent, other, plane, surf);
}
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;

View file

@ -70,10 +70,6 @@ cvar_t *sk_hyperblaster_color; // hyperblaster color- 1=yellow, 2=green, 3=blue
cvar_t *sk_railgun_damage;
cvar_t *sk_railgun_damage_dm;
cvar_t *sk_railgun_skin;
cvar_t *sk_rail_color;
cvar_t *sk_rail_color_red;
cvar_t *sk_rail_color_green;
cvar_t *sk_rail_color_blue;
cvar_t *sk_bfg_damage;
cvar_t *sk_bfg_damage_dm;
@ -109,6 +105,8 @@ cvar_t *sk_etf_rifle_speed;
cvar_t *sk_plasmabeam_damage;
cvar_t *sk_plasmabeam_damage_dm;
cvar_t *sk_plasmabeam_kick;
cvar_t *sk_plasmabeam_kick_dm;
cvar_t *sk_disruptor_damage;
cvar_t *sk_disruptor_damage_dm;
@ -128,6 +126,16 @@ cvar_t *sk_tesla_health;
cvar_t *sk_chainfist_damage;
cvar_t *sk_chainfist_damage_dm;
cvar_t *sk_plasma_rifle_damage_bounce;
cvar_t *sk_plasma_rifle_damage_bounce_dm;
cvar_t *sk_plasma_rifle_damage_spread;
cvar_t *sk_plasma_rifle_damage_spread_dm;
cvar_t *sk_plasma_rifle_speed_bounce;
cvar_t *sk_plasma_rifle_speed_spread;
cvar_t *sk_plasma_rifle_radius;
cvar_t *sk_plasma_rifle_life_bounce;
cvar_t *sk_plasma_rifle_life_spread;
cvar_t *sk_nuke_delay;
cvar_t *sk_nuke_life;
cvar_t *sk_nuke_radius;
@ -146,16 +154,6 @@ cvar_t *sk_shockwave_speed;
cvar_t *sk_shockwave_effect_damage;
cvar_t *sk_shockwave_effect_radius;
cvar_t *sk_plasma_rifle_damage_bounce;
cvar_t *sk_plasma_rifle_damage_bounce_dm;
cvar_t *sk_plasma_rifle_damage_spread;
cvar_t *sk_plasma_rifle_damage_spread_dm;
cvar_t *sk_plasma_rifle_speed_bounce;
cvar_t *sk_plasma_rifle_speed_spread;
cvar_t *sk_plasma_rifle_radius;
cvar_t *sk_plasma_rifle_life_bounce;
cvar_t *sk_plasma_rifle_life_spread;
cvar_t *sk_flaregun_damage;
cvar_t *sk_flaregun_rdamage;
cvar_t *sk_flaregun_radius;
@ -225,8 +223,8 @@ cvar_t *sk_dm_start_proxlauncher;
cvar_t *sk_dm_start_plasmabeam;
cvar_t *sk_dm_start_disruptor;
cvar_t *sk_dm_start_chainfist;
cvar_t *sk_dm_start_shockwave;
cvar_t *sk_dm_start_plasmarifle;
cvar_t *sk_dm_start_shockwave;
cvar_t *sk_dm_start_flaregun;
//cvar_t *sk_dm_start_sniperrifle;
//cvar_t *sk_dm_start_soniccannon;
@ -411,10 +409,6 @@ void InitLithiumVars (void)
sk_railgun_damage = gi.cvar("sk_railgun_damage", "150", 0);
sk_railgun_damage_dm = gi.cvar("sk_railgun_damage_dm", "100", 0);
sk_railgun_skin = gi.cvar("sk_railgun_skin", "0", 0);
sk_rail_color = gi.cvar("sk_rail_color", "1", 0);
sk_rail_color_red = gi.cvar("sk_rail_color_red", "255", 0);
sk_rail_color_green = gi.cvar("sk_rail_color_green", "20", 0);
sk_rail_color_blue = gi.cvar("sk_rail_color_blue", "20", 0);
sk_bfg_damage = gi.cvar("sk_bfg_damage", "500", 0);
sk_bfg_damage_dm = gi.cvar("sk_bfg_damage_dm", "200", 0);
@ -450,6 +444,8 @@ void InitLithiumVars (void)
sk_plasmabeam_damage = gi.cvar("sk_plasmabeam_damage", "15", 0);
sk_plasmabeam_damage_dm = gi.cvar("sk_plasmabeam_damage_dm", "15", 0);
sk_plasmabeam_kick = gi.cvar("sk_plasmabeam_kick", "30", 0);
sk_plasmabeam_kick_dm = gi.cvar("sk_plasmabeam_kick_dm", "75", 0);
sk_disruptor_damage = gi.cvar("sk_disruptor_damage", "45", 0);
sk_disruptor_damage_dm = gi.cvar("sk_disruptor_damage_dm", "30", 0);
@ -469,6 +465,16 @@ void InitLithiumVars (void)
sk_chainfist_damage = gi.cvar("sk_chainfist_damage", "15", 0);
sk_chainfist_damage_dm = gi.cvar("sk_chainfist_damage_dm", "30", 0);
sk_plasma_rifle_damage_bounce = gi.cvar("sk_plasma_rifle_damage_bounce", "60", 0);
sk_plasma_rifle_damage_bounce_dm = gi.cvar("sk_plasma_rifle_damage_bounce_dm", "39", 0);
sk_plasma_rifle_damage_spread = gi.cvar("sk_plasma_rifle_damage_spread", "43", 0);
sk_plasma_rifle_damage_spread_dm = gi.cvar("sk_plasma_rifle_damage_spread_dm", "28", 0);
sk_plasma_rifle_speed_bounce = gi.cvar("sk_plasma_rifle_speed_bounce", "1200", 0);
sk_plasma_rifle_speed_spread = gi.cvar("sk_plasma_rifle_speed_spread", "1200", 0);
sk_plasma_rifle_radius = gi.cvar("sk_plasma_rifle_radius", "70", 0);
sk_plasma_rifle_life_bounce = gi.cvar("sk_plasma_rifle_life_bounce", "3", 0);
sk_plasma_rifle_life_spread = gi.cvar("sk_plasma_rifle_life_spread", "3", 0);
sk_nuke_delay = gi.cvar("sk_nuke_delay", "4", 0);
sk_nuke_life = gi.cvar("sk_nuke_life", "6", 0);
sk_nuke_radius = gi.cvar("sk_nuke_radius", "512", 0);
@ -487,16 +493,6 @@ void InitLithiumVars (void)
sk_shockwave_effect_damage = gi.cvar("sk_shockwave_effect_damage", "100", 0);
sk_shockwave_effect_radius = gi.cvar("sk_shockwave_effect_radius", "340", 0);
sk_plasma_rifle_damage_bounce = gi.cvar("sk_plasma_rifle_damage_bounce", "60", 0);
sk_plasma_rifle_damage_bounce_dm = gi.cvar("sk_plasma_rifle_damage_bounce_dm", "39", 0);
sk_plasma_rifle_damage_spread = gi.cvar("sk_plasma_rifle_damage_spread", "43", 0);
sk_plasma_rifle_damage_spread_dm = gi.cvar("sk_plasma_rifle_damage_spread_dm", "28", 0);
sk_plasma_rifle_speed_bounce = gi.cvar("sk_plasma_rifle_speed_bounce", "1200", 0);
sk_plasma_rifle_speed_spread = gi.cvar("sk_plasma_rifle_speed_spread", "1200", 0);
sk_plasma_rifle_radius = gi.cvar("sk_plasma_rifle_radius", "70", 0);
sk_plasma_rifle_life_bounce = gi.cvar("sk_plasma_rifle_life_bounce", "3", 0);
sk_plasma_rifle_life_spread = gi.cvar("sk_plasma_rifle_life_spread", "3", 0);
sk_flaregun_damage = gi.cvar("sk_flaregun_damage", "1", 0);
sk_flaregun_rdamage = gi.cvar("sk_flaregun_rdamage", "1", 0);
sk_flaregun_radius = gi.cvar("sk_flaregun_radius", "1", 0);
@ -565,8 +561,8 @@ void InitLithiumVars (void)
sk_dm_start_plasmabeam = gi.cvar("sk_dm_start_plasmabeam", "0", 0);
sk_dm_start_disruptor = gi.cvar("sk_dm_start_disruptor", "0", 0);
sk_dm_start_chainfist = gi.cvar("sk_dm_start_chainfist", "0", 0);
sk_dm_start_shockwave = gi.cvar("sk_dm_start_shockwave", "0", 0);
sk_dm_start_plasmarifle = gi.cvar("sk_dm_start_plasmarifle", "0", 0);
sk_dm_start_shockwave = gi.cvar("sk_dm_start_shockwave", "0", 0);
sk_dm_start_flaregun = gi.cvar("sk_dm_start_flaregun", "0", 0);
// sk_dm_start_sniperrifle = gi.cvar("sk_dm_start_sniperrifle", "0", 0);
// sk_dm_start_soniccannon = gi.cvar("sk_dm_start_soniccannon", "0", 0);

View file

@ -66,10 +66,6 @@ extern cvar_t *sk_hyperblaster_color;
extern cvar_t *sk_railgun_damage;
extern cvar_t *sk_railgun_damage_dm;
extern cvar_t *sk_railgun_skin;
extern cvar_t *sk_rail_color;
extern cvar_t *sk_rail_color_red;
extern cvar_t *sk_rail_color_green;
extern cvar_t *sk_rail_color_blue;
extern cvar_t *sk_bfg_damage;
extern cvar_t *sk_bfg_damage_dm;
@ -105,6 +101,8 @@ extern cvar_t *sk_etf_rifle_speed;
extern cvar_t *sk_plasmabeam_damage;
extern cvar_t *sk_plasmabeam_damage_dm;
extern cvar_t *sk_plasmabeam_kick;
extern cvar_t *sk_plasmabeam_kick_dm;
extern cvar_t *sk_disruptor_damage;
extern cvar_t *sk_disruptor_damage_dm;
@ -124,6 +122,16 @@ extern cvar_t *sk_tesla_health;
extern cvar_t *sk_chainfist_damage;
extern cvar_t *sk_chainfist_damage_dm;
extern cvar_t *sk_plasma_rifle_damage_bounce;
extern cvar_t *sk_plasma_rifle_damage_bounce_dm;
extern cvar_t *sk_plasma_rifle_damage_spread;
extern cvar_t *sk_plasma_rifle_damage_spread_dm;
extern cvar_t *sk_plasma_rifle_speed_bounce;
extern cvar_t *sk_plasma_rifle_speed_spread;
extern cvar_t *sk_plasma_rifle_radius;
extern cvar_t *sk_plasma_rifle_life_bounce;
extern cvar_t *sk_plasma_rifle_life_spread;
extern cvar_t *sk_nuke_delay;
extern cvar_t *sk_nuke_life;
extern cvar_t *sk_nuke_radius;
@ -142,16 +150,6 @@ extern cvar_t *sk_shockwave_radius;
extern cvar_t *sk_shockwave_effect_damage;
extern cvar_t *sk_shockwave_effect_radius;
extern cvar_t *sk_plasma_rifle_damage_bounce;
extern cvar_t *sk_plasma_rifle_damage_bounce_dm;
extern cvar_t *sk_plasma_rifle_damage_spread;
extern cvar_t *sk_plasma_rifle_damage_spread_dm;
extern cvar_t *sk_plasma_rifle_speed_bounce;
extern cvar_t *sk_plasma_rifle_speed_spread;
extern cvar_t *sk_plasma_rifle_radius;
extern cvar_t *sk_plasma_rifle_life_bounce;
extern cvar_t *sk_plasma_rifle_life_spread;
extern cvar_t *sk_flaregun_damage;
extern cvar_t *sk_flaregun_rdamage;
extern cvar_t *sk_flaregun_radius;
@ -222,8 +220,8 @@ extern cvar_t *sk_dm_start_proxlauncher;
extern cvar_t *sk_dm_start_plasmabeam;
extern cvar_t *sk_dm_start_disruptor;
extern cvar_t *sk_dm_start_chainfist;
extern cvar_t *sk_dm_start_shockwave;
extern cvar_t *sk_dm_start_plasmarifle;
extern cvar_t *sk_dm_start_shockwave;
extern cvar_t *sk_dm_start_flaregun;
//extern cvar_t *sk_dm_start_sniperrifle;
//extern cvar_t *sk_dm_start_soniccannon;
@ -325,6 +323,7 @@ extern cvar_t *sk_defender_blaster_speed;
extern cvar_t *sk_vengeance_time;
extern cvar_t *sk_vengeance_health_threshold;
extern cvar_t *sk_hunter_time;
extern cvar_t *sk_doppleganger_time;
extern cvar_t *sk_quad_time;
extern cvar_t *sk_inv_time;
extern cvar_t *sk_breather_time;
@ -333,7 +332,6 @@ extern cvar_t *sk_silencer_shots;
extern cvar_t *sk_ir_time;
extern cvar_t *sk_double_time;
extern cvar_t *sk_quad_fire_time;
extern cvar_t *sk_doppleganger_time;
extern cvar_t *sk_stasis_time;
extern cvar_t *sk_visor_time;
//extern cvar_t *sk_sniper_charge_time;

View file

@ -363,6 +363,9 @@ ENTITY_DOPPLEGANGER,
ENTITY_TAGTOKEN,
ENTITY_MISC_NUKE_CORE,
ENTITY_MISC_NUKE,
// Knightmare added
ENTITY_PROX_FIELD,
ENTITY_MONSTER_GUNNER_TACTICIAN,
// Zaero
ENTITY_FUNC_BARRIER,
ENTITY_TRIGGER_LASER,
@ -382,7 +385,7 @@ ENTITY_Z_EMPNUKECENTER,
// LMSP
ENTITY_MONSTER_SOLDIER_PLASMA_BOUNCE,
ENTITY_MONSTER_SOLDIER_PLASMA_SPREAD,
ENTITY_GOOP,
ENTITY_PLASMABALL,
// Q1
ENTITY_MONSTER_Q1_CHTHON,
ENTITY_MONSTER_Q1_DOG,
@ -421,7 +424,4 @@ ENTITY_MISC_Q1_EXPLOBOX,
ENTITY_Q1_FIREBALL,
ENTITY_MISC_Q1_FIREBALL_SPAWNER,
ENTITY_MONSTER_Q1_FREDDIE,
// New stuff
ENTITY_MONSTER_GUNNER_TACTICIAN,
ENTITY_PROX_FIELD
} entity_id;

View file

@ -306,10 +306,6 @@ void gunner_pain (edict_t *self, edict_t *other, float kick, int damage)
monster_done_dodge (self);
// Tactician Gunner shrugs off small damage
if ( (self->moreflags & FL2_COMMANDER) && (damage < 10) )
return;
if (!self->groundentity)
{
// if ((g_showlogic) && (g_showlogic->value))
@ -338,6 +334,10 @@ void gunner_pain (edict_t *self, edict_t *other, float kick, int damage)
if (skill->value == 3)
return; // no pain anims in nightmare
// Tactician Gunner shrugs off small damage
if ( (self->moreflags & FL2_COMMANDER) && (damage < 10) )
return;
if (self->moreflags & FL2_COMMANDER) {
smallDamage = 20;
bigDamage = 50;

View file

@ -89,6 +89,7 @@
GenerateMapFile="true"
MapFileName=".\debug/gamex86.map"
SubSystem="2"
LargeAddressAware="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\debug/gamex86.lib"
@ -288,6 +289,7 @@
ModuleDefinitionFile=".\game.def"
ProgramDatabaseFile=".\release/gamex86.pdb"
SubSystem="2"
LargeAddressAware="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\release/gamex86.lib"

View file

@ -1670,6 +1670,10 @@ void SelectStartWeapon (gclient_t *client, int style)
case 18:
item = FindItem("Shockwave");
break;
case -19:
case 19:
item = FindItem(PLASMA_PICKUP_NAME);
break;
default:
item = FindItem("Blaster");
break;
@ -1747,8 +1751,8 @@ void SelectStartWeapon (gclient_t *client, int style)
client->pers.inventory[ITEM_INDEX(FindItem("Plasma Beam"))] = sk_dm_start_plasmabeam->value;
client->pers.inventory[ITEM_INDEX(FindItem("Disintegrator"))] = sk_dm_start_disruptor->value;
client->pers.inventory[ITEM_INDEX(FindItem("Chainfist"))] = sk_dm_start_chainfist->value;
client->pers.inventory[ITEM_INDEX(FindItem("Shockwave"))] = sk_dm_start_shockwave->value;
client->pers.inventory[ITEM_INDEX(FindItem(PLASMA_PICKUP_NAME))] = sk_dm_start_plasmarifle->value;
client->pers.inventory[ITEM_INDEX(FindItem("Shockwave"))] = sk_dm_start_shockwave->value;
client->pers.inventory[ITEM_INDEX(FindItem("Flare Gun"))] = sk_dm_start_flaregun->value;
// client->pers.inventory[ITEM_INDEX(FindItem("Sniper Rifle"))] = sk_dm_start_sniperrifle->value;
// client->pers.inventory[ITEM_INDEX(FindItem("Sonic Cannon"))] = sk_dm_start_soniccannon->value;
@ -1767,7 +1771,7 @@ but is called after each death and level change in deathmatch
*/
void InitClientPersistant (gclient_t *client, int style)
{
//gitem_t *item;
// gitem_t *item;
memset (&client->pers, 0, sizeof(client->pers));
@ -1824,6 +1828,10 @@ void InitClientPersistant (gclient_t *client, int style)
client->spycam = NULL;
client->pers.spawn_landmark = false;
client->pers.spawn_levelchange = false;
// custom client colors
Vector4Set (client->pers.color1, 255, 255, 255, 0);
Vector4Set (client->pers.color2, 255, 255, 255, 0);
}
@ -2623,11 +2631,11 @@ void PutClientInServer (edict_t *ent)
// clear entity state values
ent->s.effects = 0;
ent->s.modelindex = MAX_MODELS-1; // was 255, will use the skin specified model
ent->s.modelindex = MAX_MODELS-1; // will use the skin specified model, was 255
if (ITEM_INDEX(client->pers.weapon) == noweapon_index)
ent->s.modelindex2 = 0;
else
ent->s.modelindex2 = MAX_MODELS-1; // was 255, custom gun model
ent->s.modelindex2 = MAX_MODELS-1; // custom gun model, was 255
// skinnum is player num and weapon number
// weapon number will be added in changeweapon
ent->s.skinnum = ent - g_edicts - 1;
@ -2956,10 +2964,23 @@ void ClientUserinfoChanged (edict_t *ent, char *userinfo)
ent->client->pers.hand = atoi(s);
}
// custom colors
s = Info_ValueForKey (userinfo, "color1");
if (strlen(s) >= 6) {
if ( Com_ParseColorString (s, ent->client->pers.color1) )
ent->client->pers.color1[3] = 255; // mark as set
}
s = Info_ValueForKey (userinfo, "color2");
if (strlen(s) >= 6) {
if ( Com_ParseColorString (s, ent->client->pers.color2) )
ent->client->pers.color2[3] = 255; // mark as set
}
// save off the userinfo in case we want to check something later
strncpy (ent->client->pers.userinfo, userinfo, sizeof(ent->client->pers.userinfo)-1);
if (use_vwep->value)
ShowGun(ent); //Knightmare- added vwep code
ShowGun (ent); // Knightmare- added vwep code
}

View file

@ -1381,9 +1381,9 @@ void G_SetClientSound (edict_t *ent)
ent->s.sound = gi.soundindex("jetpack/stutter.wav");
else if (strcmp(weap, "weapon_railgun") == 0)
ent->s.sound = gi.soundindex("weapons/rg_hum.wav");
#ifdef KMQUAKE2_ENGINE_MOD
else if (strcmp(weap, "weapon_bfg") == 0)
ent->s.sound = gi.soundindex("weapons/bfg_hum.wav");
#ifdef KMQUAKE2_ENGINE_MOD
// RAFAEL
else if (strcmp (weap, "weapon_phalanx") == 0)
ent->s.sound = gi.soundindex ("weapons/phaloop.wav");

View file

@ -225,9 +225,9 @@ VWEP
===============
*/
void ShowGun(edict_t *ent)
void ShowGun (edict_t *ent)
{
if (ent->s.modelindex == (MAX_MODELS-1)) //was 255
if (ent->s.modelindex == (MAX_MODELS-1)) // was 255
{
int i=0;
@ -268,7 +268,7 @@ void ChangeWeapon (edict_t *ent)
ent->client->machinegun_shots = 0;
// set visible model
if (ent->s.modelindex == (MAX_MODELS-1)) //was 255
if (ent->s.modelindex == (MAX_MODELS-1)) // was 255
{
if (ent->client->pers.weapon)
i = ((ent->client->pers.weapon->weapmodel & 0xff) << 8);
@ -722,14 +722,13 @@ void Weapon_Generic (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST,
}
// Knightmare- activate and putaway sounds for ION Ripper and Shockwave
#ifdef KMQUAKE2_ENGINE_MOD
if (!strcmp (ent->client->pers.weapon->pickup_name, "ION Ripper") && sk_ionripper_extra_sounds->value)
{
if (ent->client->ps.gunframe == 0)
gi.sound (ent, CHAN_AUTO, gi.soundindex("weapons/ionactive.wav"), 1.0, ATTN_NORM, 0);
#ifdef KMQUAKE2_ENGINE_MOD
else if (ent->client->ps.gunframe == 37)
gi.sound (ent, CHAN_AUTO, gi.soundindex("weapons/ionaway.wav"), 1.0, ATTN_NORM, 0);
#endif
}
if (!strcmp (ent->client->pers.weapon->pickup_name, "Shockwave"))
{
@ -738,6 +737,7 @@ void Weapon_Generic (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST,
else if (ent->client->ps.gunframe == 62)
gi.sound (ent, CHAN_AUTO, gi.soundindex("weapons/shockaway.wav"), 1.0, ATTN_NORM, 0);
}
#endif
if (ent->client->weaponstate == WEAPON_DROPPING)
{
@ -835,7 +835,7 @@ void Weapon_Generic (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST,
ent->client->latched_buttons &= ~BUTTONS_ATTACK;
ent->client->buttons &= ~BUTTONS_ATTACK;
}
if (current_weapon_index == pr_index) // plasma rifle bounce/spread switch
else if (current_weapon_index == pr_index) // plasma rifle bounce/spread switch
{
ent->client->pers.plasma_mode = (!ent->client->pers.plasma_mode);
if (ent->client->pers.plasma_mode)
@ -920,7 +920,7 @@ void Weapon_Generic (edict_t *ent, int FRAME_ACTIVATE_LAST, int FRAME_FIRE_LAST,
if (current_weapon_index == pr_index)
{
if ( ent->client->ps.gunframe == 35 )
gi.sound(ent, CHAN_WEAPON, gi.soundindex(PLASMA_SOUND_VENT), 1, ATTN_NORM,0 );
gi.sound(ent, CHAN_WEAPON, gi.soundindex(PLASMA_SOUND_VENT), 1, ATTN_NORM, 0 );
}
ent->client->ps.gunframe++;
@ -973,7 +973,7 @@ void weapon_grenade_fire (edict_t *ent, qboolean held)
vec3_t offset;
vec3_t forward, right, up;
vec3_t start;
int damage = sk_hand_grenade_damage->value; // was 125
int damage = (int)sk_hand_grenade_damage->value; // was 125
float timer;
int speed;
float radius;
@ -1359,10 +1359,10 @@ void weapon_grenadelauncher_fire (edict_t *ent, qboolean altfire)
switch(ent->client->pers.weapon->tag)
{
case AMMO_PROX:
damage = sk_prox_damage->value;
damage = (int)sk_prox_damage->value;
break;
default:
damage = sk_grenade_damage->value;
damage = (int)sk_grenade_damage->value;
break;
}
// PGM
@ -1510,8 +1510,8 @@ void Weapon_RocketLauncher_Fire (edict_t *ent, qboolean altfire)
float damage_radius;
int radius_damage;
damage = sk_rocket_damage->value + (int)(random() * sk_rocket_damage2->value);
radius_damage = sk_rocket_rdamage->value;
damage = (int)sk_rocket_damage->value + (int)(random() * (int)sk_rocket_damage2->value);
radius_damage = (int)sk_rocket_rdamage->value;
damage_radius = sk_rocket_radius->value;
if (is_quad) {
//PGM
@ -1554,10 +1554,10 @@ void Weapon_RocketLauncher_Fire (edict_t *ent, qboolean altfire)
}
target = rocket_target(ent, start, forward);
fire_rocket (ent, start, forward, damage, sk_rocket_speed->value, damage_radius, radius_damage, target);
fire_rocket (ent, start, forward, damage, (int)sk_rocket_speed->value, damage_radius, radius_damage, target);
}
else
fire_rocket (ent, start, forward, damage, sk_rocket_speed->value, damage_radius, radius_damage, NULL);
fire_rocket (ent, start, forward, damage, (int)sk_rocket_speed->value, damage_radius, radius_damage, NULL);
// send muzzle flash
// Knightmare- Gen cam code
@ -1649,9 +1649,9 @@ int Blaster_Fire (edict_t *ent, vec3_t g_offset, int damage, qboolean hyper, int
// end Zaero
if (!hyper)
fire_blaster (ent, start, forward, damage, sk_blaster_speed->value, effect, hyper, color);
fire_blaster (ent, start, forward, damage, (int)sk_blaster_speed->value, effect, hyper, color);
else
fire_blaster (ent, start, forward, damage, sk_hyperblaster_speed->value, effect, hyper, color);
fire_blaster (ent, start, forward, damage, (int)sk_hyperblaster_speed->value, effect, hyper, color);
// Knightmare- select muzzle flash
if (hyper)
@ -1721,9 +1721,9 @@ void Weapon_Blaster_Fire (edict_t *ent, qboolean altfire)
int color;
if (deathmatch->value)
damage = sk_blaster_damage_dm->value;
damage = (int)sk_blaster_damage_dm->value;
else
damage = sk_blaster_damage->value;
damage = (int)sk_blaster_damage->value;
// select color
color = (int)sk_blaster_color->value;
@ -1820,9 +1820,9 @@ void Weapon_HyperBlaster_Fire (edict_t *ent, qboolean altfire)
effect = 0;
if (deathmatch->value)
damage = sk_hyperblaster_damage_dm->value;
damage = (int)sk_hyperblaster_damage_dm->value;
else
damage = sk_hyperblaster_damage->value;
damage = (int)sk_hyperblaster_damage->value;
// Blaster_Fire (ent, offset, damage, true, effect, color);
if ( Blaster_Fire (ent, offset, damage, true, effect, color) ) {
if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
@ -1878,7 +1878,7 @@ void Machinegun_Fire (edict_t *ent, qboolean altfire)
vec3_t start;
vec3_t forward, right;
vec3_t angles;
int damage = sk_machinegun_damage->value;
int damage = (int)sk_machinegun_damage->value;
int kick = 2;
vec3_t offset;
@ -1940,9 +1940,9 @@ void Machinegun_Fire (edict_t *ent, qboolean altfire)
AngleVectors (angles, forward, right, NULL);
VectorSet(offset, 0, 8, ent->viewheight-8);
P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);
fire_bullet (ent, start, forward, damage, kick, sk_machinegun_hspread->value, sk_machinegun_vspread->value, MOD_MACHINEGUN);
fire_bullet (ent, start, forward, damage, kick, (int)sk_machinegun_hspread->value, (int)sk_machinegun_vspread->value, MOD_MACHINEGUN);
//Knightmare- Gen cam code
// Knightmare- Gen cam code
// if (ent->client && ent->client->chasetoggle)
if (ent->client && ent->client->chaseactive)
{
@ -1999,9 +1999,9 @@ void Chaingun_Fire (edict_t *ent, qboolean altfire)
int kick = 2;
if (deathmatch->value)
damage = sk_chaingun_damage_dm->value;
damage = (int)sk_chaingun_damage_dm->value;
else
damage = sk_chaingun_damage->value;
damage = (int)sk_chaingun_damage->value;
if (ent->client->ps.gunframe == 5)
gi.sound(ent, CHAN_AUTO, gi.soundindex("weapons/chngnu1a.wav"), 1, ATTN_IDLE, 0);
@ -2158,7 +2158,7 @@ void weapon_shotgun_fire (edict_t *ent, qboolean altfire)
vec3_t start;
vec3_t forward, right;
vec3_t offset;
int damage = sk_shotgun_damage->value;
int damage = (int)sk_shotgun_damage->value;
int kick = 8;
if (ent->client->ps.gunframe == 9)
@ -2189,9 +2189,9 @@ void weapon_shotgun_fire (edict_t *ent, qboolean altfire)
}
if (deathmatch->value)
fire_shotgun (ent, start, forward, damage, kick, sk_shotgun_hspread->value, sk_shotgun_vspread->value, sk_shotgun_count->value, MOD_SHOTGUN);
fire_shotgun (ent, start, forward, damage, kick, (int)sk_shotgun_hspread->value, (int)sk_shotgun_vspread->value, (int)sk_shotgun_count->value, MOD_SHOTGUN);
else
fire_shotgun (ent, start, forward, damage, kick, sk_shotgun_hspread->value, sk_shotgun_vspread->value, sk_shotgun_count->value, MOD_SHOTGUN);
fire_shotgun (ent, start, forward, damage, kick, (int)sk_shotgun_hspread->value, (int)sk_shotgun_vspread->value, (int)sk_shotgun_count->value, MOD_SHOTGUN);
// send muzzle flash
//Knightmare- Gen cam code
@ -2235,7 +2235,7 @@ void weapon_supershotgun_fire (edict_t *ent, qboolean altfire)
vec3_t forward, right;
vec3_t offset;
vec3_t v;
int damage = sk_sshotgun_damage->value;
int damage = (int)sk_sshotgun_damage->value;
int kick = 12;
AngleVectors (ent->client->v_angle, forward, right, NULL);
@ -2263,10 +2263,10 @@ void weapon_supershotgun_fire (edict_t *ent, qboolean altfire)
v[YAW] = ent->client->v_angle[YAW] - 5;
v[ROLL] = ent->client->v_angle[ROLL];
AngleVectors (v, forward, NULL, NULL);
fire_shotgun (ent, start, forward, damage, kick, sk_sshotgun_hspread->value, sk_sshotgun_vspread->value, sk_sshotgun_count->value/2, MOD_SSHOTGUN);
fire_shotgun (ent, start, forward, damage, kick, (int)sk_sshotgun_hspread->value, (int)sk_sshotgun_vspread->value, (int)sk_sshotgun_count->value/2, MOD_SSHOTGUN);
v[YAW] = ent->client->v_angle[YAW] + 5;
AngleVectors (v, forward, NULL, NULL);
fire_shotgun (ent, start, forward, damage, kick, sk_sshotgun_hspread->value, sk_sshotgun_vspread->value, sk_sshotgun_count->value/2, MOD_SSHOTGUN);
fire_shotgun (ent, start, forward, damage, kick, (int)sk_sshotgun_hspread->value, (int)sk_sshotgun_vspread->value, (int)sk_sshotgun_count->value/2, MOD_SSHOTGUN);
// send muzzle flash
// Knightmare- Gen cam code
@ -2325,12 +2325,12 @@ void weapon_railgun_fire (edict_t *ent, qboolean altfire)
if (deathmatch->value)
{ // normal damage is too extreme in dm
damage = sk_railgun_damage_dm->value;
damage = (int)sk_railgun_damage_dm->value;
kick = 200;
}
else
{
damage = sk_railgun_damage->value;
damage = (int)sk_railgun_damage->value;
kick = 250;
}
@ -2347,12 +2347,13 @@ void weapon_railgun_fire (edict_t *ent, qboolean altfire)
kick *= 2;
}
// changeable color
if ( (sk_rail_color->value >= 2 ) && ent->client ) {
// custom client color
if ( ent->client && (ent->client->pers.color1[3] != 0) )
{
useColor = true;
red = (int)sk_rail_color_red->value;
green = (int)sk_rail_color_green->value;
blue = (int)sk_rail_color_blue->value;
red = ent->client->pers.color1[0];
green = ent->client->pers.color1[1];
blue = ent->client->pers.color1[2];
}
AngleVectors (ent->client->v_angle, forward, right, NULL);
@ -2455,9 +2456,9 @@ void weapon_bfg_fire (edict_t *ent, qboolean altfire)
// end Zaero
if (deathmatch->value)
damage = sk_bfg_damage_dm->value;
damage = (int)sk_bfg_damage_dm->value;
else
damage = sk_bfg_damage->value;
damage = (int)sk_bfg_damage->value;
if (ent->client->ps.gunframe == 9)
{
@ -2516,7 +2517,7 @@ void weapon_bfg_fire (edict_t *ent, qboolean altfire)
P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);
*/
fire_bfg (ent, start, forward, damage, sk_bfg_speed->value, damage_radius); //was 400
fire_bfg (ent, start, forward, damage, (int)sk_bfg_speed->value, damage_radius); // was 400
ent->client->ps.gunframe++;
@ -2556,13 +2557,13 @@ void weapon_ionripper_fire (edict_t *ent, qboolean altfire)
if (deathmatch->value)
{
// tone down for deathmatch
damage = sk_ionripper_damage_dm->value;
kick = sk_ionripper_kick_dm->value; // 40
damage = (int)sk_ionripper_damage_dm->value;
kick = (int)sk_ionripper_kick_dm->value; // 40
}
else
{
damage = sk_ionripper_damage->value;
kick = sk_ionripper_kick->value; // 60
damage = (int)sk_ionripper_damage->value;
kick = (int)sk_ionripper_kick->value; // 60
}
if (is_quad) {
@ -2596,7 +2597,7 @@ void weapon_ionripper_fire (edict_t *ent, qboolean altfire)
}
// end Zaero
fire_ionripper (ent, start, forward, damage, sk_ionripper_speed->value, EF_IONRIPPER);
fire_ionripper (ent, start, forward, damage, (int)sk_ionripper_speed->value, EF_IONRIPPER);
// send muzzle flash
//Knightmare- Gen cam code
@ -2654,8 +2655,8 @@ void weapon_phalanx_fire (edict_t *ent, qboolean altfire)
float damage_radius;
int radius_damage;
damage = sk_phalanx_damage->value + (int)(random() * sk_phalanx_damage2->value);
radius_damage = sk_phalanx_radius_damage->value;
damage = (int)sk_phalanx_damage->value + (int)(random() * (int)sk_phalanx_damage2->value);
radius_damage = (int)sk_phalanx_radius_damage->value;
damage_radius = sk_phalanx_radius->value;
if (is_quad) {
@ -2691,7 +2692,7 @@ void weapon_phalanx_fire (edict_t *ent, qboolean altfire)
v[ROLL] = ent->client->v_angle[ROLL];
AngleVectors (v, forward, right, up);
fire_phalanx_plasma (ent, start, forward, damage, sk_phalanx_speed->value, damage_radius, radius_damage);
fire_phalanx_plasma (ent, start, forward, damage, (int)sk_phalanx_speed->value, damage_radius, radius_damage);
if (! ( (int)dmflags->value & DF_INFINITE_AMMO ) )
ent->client->pers.inventory[ent->client->ammo_index]--;
@ -2702,7 +2703,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_phalanx_plasma (ent, start, forward, damage, sk_phalanx_speed->value, damage_radius, radius_damage);
fire_phalanx_plasma (ent, start, forward, damage, (int)sk_phalanx_speed->value, damage_radius, radius_damage);
// send muzzle flash
// Knightmare- Gen cam code
@ -2928,9 +2929,9 @@ void weapon_chainfist_fire (edict_t *ent, qboolean altfire)
int damage;
if (deathmatch->value)
damage = sk_chainfist_damage_dm->value;
damage = (int)sk_chainfist_damage_dm->value;
else
damage = sk_chainfist_damage->value;
damage = (int)sk_chainfist_damage->value;
if (is_quad) {
// damage *= damage_multiplier;
@ -3088,9 +3089,9 @@ void weapon_tracker_fire (edict_t *self, qboolean altfire)
// PMM - felt a little high at 25
if (deathmatch->value)
damage = sk_disruptor_damage_dm->value;
damage = (int)sk_disruptor_damage_dm->value;
else
damage = sk_disruptor_damage->value;
damage = (int)sk_disruptor_damage->value;
if (is_quad) {
// damage *= damage_multiplier; //PGM
@ -3144,7 +3145,7 @@ void weapon_tracker_fire (edict_t *self, qboolean altfire)
VectorScale (forward, -2, self->client->kick_origin);
self->client->kick_angles[0] = -1;
fire_tracker (self, start, forward, damage, sk_disruptor_speed->value, enemy);
fire_tracker (self, start, forward, damage, (int)sk_disruptor_speed->value, enemy);
// send muzzle flash
// Knightmare- Gen cam code
@ -3201,12 +3202,12 @@ void weapon_etf_rifle_fire (edict_t *ent, qboolean altfire)
vec3_t offset;
damage_radius = sk_etf_rifle_radius->value;
radius_damage = sk_etf_rifle_radius_damage->value;
radius_damage = (int)sk_etf_rifle_radius_damage->value;
if (deathmatch->value)
damage = sk_etf_rifle_damage->value;
damage = (int)sk_etf_rifle_damage->value;
else
damage = sk_etf_rifle_damage->value;
damage = (int)sk_etf_rifle_damage->value;
// PGM - adjusted to use the quantity entry in the weapon structure.
if (ent->client->pers.inventory[ent->client->ammo_index] < ent->client->pers.weapon->quantity)
@ -3262,7 +3263,7 @@ void weapon_etf_rifle_fire (edict_t *ent, qboolean altfire)
tempPt[2] += ent->viewheight;
P_ProjectSource2 (ent->client, tempPt, offset, forward, right, up, start);
// gi.dprintf("start: %s\n", vtos(start));
fire_flechette (ent, start, forward, damage, sk_etf_rifle_speed->value, damage_radius, radius_damage);
fire_flechette (ent, start, forward, damage, (int)sk_etf_rifle_speed->value, damage_radius, radius_damage);
// send muzzle flash
//Knightmare- Gen cam code
@ -3331,8 +3332,8 @@ void Weapon_ETF_Rifle (edict_t *ent)
// pgm - this now uses ent->client->pers.weapon->quantity like all the other weapons
//#define HEATBEAM_AMMO_USE 2
#define HEATBEAM_DM_DMG 30
#define HEATBEAM_SP_DMG 30
#define HEATBEAM_DM_DMG 15
#define HEATBEAM_SP_DMG 15
void Heatbeam_Fire (edict_t *ent, qboolean altfire)
{
@ -3345,20 +3346,20 @@ void Heatbeam_Fire (edict_t *ent, qboolean altfire)
// for comparison, the hyperblaster is 15/20
// jim requested more damage, so try 15/15 --- PGM 07/23/98
if (deathmatch->value)
damage = sk_plasmabeam_damage->value;
damage = (int)sk_plasmabeam_damage_dm->value;
else
damage = sk_plasmabeam_damage->value;
damage = (int)sk_plasmabeam_damage->value;
if (deathmatch->value) // really knock 'em around in deathmatch
kick = 75;
kick = (int)sk_plasmabeam_kick_dm->value; // was 75
else
kick = 30;
kick = (int)sk_plasmabeam_kick->value; // was 30
// if (ent->client->pers.inventory[ent->client->ammo_index] < HEATBEAM_AMMO_USE)
// {
// NoAmmoWeaponChange (ent);
// return;
// }
/* if (ent->client->pers.inventory[ent->client->ammo_index] < HEATBEAM_AMMO_USE)
{
NoAmmoWeaponChange (ent);
return;
} */
ent->client->ps.gunframe++;
@ -3527,8 +3528,8 @@ void Shockwave_Fire (edict_t *ent, qboolean altfire)
int radius_damage;
qboolean emp_missfire = false; // added for Zaero
damage = sk_shockwave_damage->value + (int)(random() * sk_shockwave_damage2->value);
radius_damage = sk_shockwave_rdamage->value;
damage = (int)sk_shockwave_damage->value + (int)(random() * (int)sk_shockwave_damage2->value);
radius_damage = (int)sk_shockwave_rdamage->value;
damage_radius = sk_shockwave_radius->value;
if (is_quad) {
@ -3593,7 +3594,7 @@ void Shockwave_Fire (edict_t *ent, qboolean altfire)
P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start);
*/
fire_shock_sphere (ent, start, forward, damage, sk_shockwave_speed->value, damage_radius, radius_damage);
fire_shock_sphere (ent, start, forward, damage, (int)sk_shockwave_speed->value, damage_radius, radius_damage);
// send muzzle flash and sound
// Knightmare- Gen cam code
@ -3764,7 +3765,7 @@ void kick_attack (edict_t *ent )
vec3_t start;
vec3_t forward, right;
vec3_t offset;
int damage = sk_jump_kick_damage->value;
int damage = (int)sk_jump_kick_damage->value;
int kick = 300;
trace_t tr;
vec3_t end;

View file

@ -111,7 +111,7 @@ __inline int Q_vsnprintf (char *Dest, size_t Count, const char *Format, va_list
#else
#define SAVEGAME_DLLNAME "Rogue + Xatrix + Lazarus integrated mod"
#endif // CITADELMOD_FEATURES
#define SAVEGAME_VERSION 5
#define SAVEGAME_VERSION 6
// angle indexes
#define PITCH 0 // up / down
@ -1361,7 +1361,8 @@ ROGUE - VERSIONS
#define CS_ITEMS (CS_LIGHTS+MAX_LIGHTSTYLES)
#define CS_PLAYERSKINS (CS_ITEMS+MAX_ITEMS)
#define CS_GENERAL (CS_PLAYERSKINS+MAX_CLIENTS)
#define CS_PAKFILE (CS_GENERAL+MAX_GENERAL)
#define CS_HUDVARIANT (CS_GENERAL+MAX_GENERAL)
#define CS_PAKFILE (CS_HUDVARIANT+1)
#define MAX_CONFIGSTRINGS (CS_PAKFILE+1)
// Knightmare- hacked configstring offsets for backward compatiblity
@ -1374,7 +1375,6 @@ ROGUE - VERSIONS
#define OLD_MAX_CONFIGSTRINGS (OLD_CS_GENERAL+MAX_GENERAL)
// end Knightmare
//==============================================

View file

@ -1970,8 +1970,12 @@ always owned, never in the world
WEAP_RAILGUN,
NULL,
0,
/* precache */ "models/weapons/v_sniper/scope/tris.md2 models/weapons/v_sniper/dmscope/tris.md2 weapons/sniper/beep.wav weapons/sniper/fire.wav "
/*"weapons/sniper/snip_act.wav weapons/sniper/snip_bye.wav"*/,
#ifdef KMQUAKE2_ENGINE_MOD
/* precache */ "models/weapons/v_sniper/scope/tris.md2 models/weapons/v_sniper/dmscope/tris.md2 weapons/sniper/beep.wav weapons/sniper/fire.wav weapons/sniper/snip_act.wav weapons/sniper/snip_bye.wav",
#else
/* precache */ "models/weapons/v_sniper/scope/tris.md2 models/weapons/v_sniper/dmscope/tris.md2 weapons/sniper/beep.wav weapons/sniper/fire.wav",
#endif // KMQUAKE2_ENGINE_MOD
/*"weapons/sniper/snip_act.wav weapons/sniper/snip_bye.wav"*/
HIDE_FROM_SELECTION
},
@ -2309,7 +2313,7 @@ always owned, never in the world
/* width */ 2,
60,
NULL,
IT_STAY_COOP|IT_POWERUP,
IT_POWERUP|IT_STAY_COOP,
0,
NULL,
0,
@ -2332,7 +2336,7 @@ always owned, never in the world
/* width */ 2,
60,
NULL,
IT_STAY_COOP|IT_POWERUP,
IT_POWERUP|IT_STAY_COOP,
0,
NULL,
0,
@ -2355,7 +2359,7 @@ always owned, never in the world
/* width */ 1,
30,
"Cells",
IT_STAY_COOP|IT_POWERUP,
IT_POWERUP|IT_STAY_COOP,
0,
NULL,
0,

View file

@ -889,6 +889,10 @@ void SP_worldspawn (edict_t *ent)
else
gi.configstring (CS_STATUSBAR, single_statusbar);
#ifdef KMQUAKE2_ENGINE_MOD
gi.configstring (CS_HUDVARIANT, "default"); // use DM/SP HUD script variant
#endif
//---------------

View file

@ -115,6 +115,7 @@ __inline int Q_vsnprintf (char *Dest, size_t Count, const char *Format, va_list
#endif
#define MAX_ITEMS 256
#define MAX_GENERAL (MAX_CLIENTS*2) // general config strings
// Knightmare- world size
#ifdef KMQUAKE2_ENGINE_MOD
@ -1084,8 +1085,20 @@ typedef enum
#define CS_LIGHTS (CS_IMAGES+MAX_IMAGES)
#define CS_ITEMS (CS_LIGHTS+MAX_LIGHTSTYLES)
#define CS_PLAYERSKINS (CS_ITEMS+MAX_ITEMS)
#define MAX_CONFIGSTRINGS (CS_PLAYERSKINS+MAX_CLIENTS)
#define CS_GENERAL (CS_PLAYERSKINS+MAX_CLIENTS)
#define CS_HUDVARIANT (CS_GENERAL+MAX_GENERAL)
#define CS_PAKFILE (CS_HUDVARIANT+1)
//#define MAX_CONFIGSTRINGS (CS_GENERAL+MAX_GENERAL)
// Knightmare- hacked configstring offsets for backward compatiblity
#define OLD_CS_SOUNDS (CS_MODELS+OLD_MAX_MODELS)
#define OLD_CS_IMAGES (OLD_CS_SOUNDS+OLD_MAX_SOUNDS)
#define OLD_CS_LIGHTS (OLD_CS_IMAGES+OLD_MAX_IMAGES)
#define OLD_CS_ITEMS (OLD_CS_LIGHTS+MAX_LIGHTSTYLES)
#define OLD_CS_PLAYERSKINS (OLD_CS_ITEMS+MAX_ITEMS)
#define OLD_CS_GENERAL (OLD_CS_PLAYERSKINS+MAX_CLIENTS)
#define OLD_MAX_CONFIGSTRINGS (OLD_CS_GENERAL+MAX_GENERAL)
// end Knightmare
//==============================================