Implemented muzzleflashes for LMCTF plasma rifle in missionpack DLL.

Implemented unique muzzleflashes for ionripper guard and plasma guard in missionpack DLL.
Implemented extended w/ short index monster muzzleflashes using short enumerator in missionpack DLL.
This commit is contained in:
Knightmare66 2021-07-09 20:45:42 -04:00
parent 94e238a893
commit 2b9c3da08e
6 changed files with 341 additions and 80 deletions

View file

@ -125,7 +125,15 @@ void monster_fire_bullet (edict_t *self, vec3_t start, vec3_t dir, int damage, i
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -135,7 +143,15 @@ void monster_fire_shotgun (edict_t *self, vec3_t start, vec3_t aimdir, int damag
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -153,7 +169,15 @@ void monster_fire_blaster (edict_t *self, vec3_t start, vec3_t dir, int damage,
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#ifdef KMQUAKE2_ENGINE_MOD
if (flashtype >= MZ2_SEND_SHORT) {
gi.WriteByte (MZ2_SEND_SHORT);
gi.WriteShort (flashtype);
gi.WriteByte (color - 1); // orange = 0, green = 1, blue = 2, red = 3
}
else
#endif
gi.WriteByte (flashtype);
gi.multicast (start, MULTICAST_PVS);
}
@ -163,7 +187,15 @@ void monster_fire_grenade (edict_t *self, vec3_t start, vec3_t aimdir, int damag
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -181,7 +213,15 @@ void monster_fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, i
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -200,7 +240,15 @@ void monster_fire_missile (edict_t *self, vec3_t start, vec3_t dir, int damage,
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -220,7 +268,15 @@ void monster_fire_railgun (edict_t *self, vec3_t start, vec3_t aimdir, int damag
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -238,7 +294,15 @@ void monster_fire_bfg (edict_t *self, vec3_t start, vec3_t aimdir, int damage, i
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -257,7 +321,15 @@ void monster_fire_blueblaster (edict_t *self, vec3_t start, vec3_t dir, int dama
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#ifdef KMQUAKE2_ENGINE_MOD
if (flashtype >= MZ2_SEND_SHORT) {
gi.WriteByte (MZ2_SEND_SHORT);
gi.WriteShort (flashtype);
gi.WriteByte (2); // blue = 2
}
else
#endif
gi.WriteByte (flashtype);
gi.multicast (start, MULTICAST_PVS);
}
@ -276,7 +348,15 @@ void monster_fire_ionripper (edict_t *self, vec3_t start, vec3_t dir, int damage
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -295,7 +375,15 @@ void monster_fire_rocket_heat (edict_t *self, vec3_t start, vec3_t dir, int dama
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -425,7 +513,15 @@ void monster_fire_phalanx (edict_t *self, vec3_t start, vec3_t dir, int 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);
gi.WriteByte (flashtype);
#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);
}
@ -444,7 +540,15 @@ void monster_fire_blaster2 (edict_t *self, vec3_t start, vec3_t dir, int damage,
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -463,7 +567,15 @@ void monster_fire_tracker (edict_t *self, vec3_t start, vec3_t dir, int damage,
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
@ -481,7 +593,15 @@ void monster_fire_heat (edict_t *self, vec3_t start, vec3_t dir, vec3_t offset,
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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
@ -494,7 +614,13 @@ void monster_fire_flechette (edict_t *self, vec3_t start, vec3_t dir, int damage
#ifdef KMQUAKE2_ENGINE_MOD // Knightmare- client muzzle flash for monster ETF Rifle is only in KMQ2
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
if (flashtype >= MZ2_SEND_SHORT) {
gi.WriteByte (MZ2_SEND_SHORT);
gi.WriteShort (flashtype);
gi.WriteByte (0);
}
else
gi.WriteByte (flashtype);
gi.multicast (start, MULTICAST_PVS);
#endif // KMQUAKE2_ENGINE_MOD
}
@ -505,7 +631,15 @@ void monster_fire_prox (edict_t *self, vec3_t start, vec3_t aimdir, int damage,
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#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);
}
// end Knightmare
@ -525,7 +659,15 @@ void monster_fire_plasma_rifle (edict_t *self, vec3_t start, vec3_t dir, int dam
gi.WriteByte (svc_muzzleflash2);
gi.WriteShort (self - g_edicts);
gi.WriteByte (flashtype);
#ifdef KMQUAKE2_ENGINE_MOD
if (flashtype >= MZ2_SEND_SHORT) {
gi.WriteByte (MZ2_SEND_SHORT);
gi.WriteShort (flashtype);
gi.WriteByte ((spread) ? 1 : 0); // 1 = spread fire sound
}
else
#endif
gi.WriteByte (flashtype);
gi.multicast (start, MULTICAST_PVS);
}

View file

@ -493,7 +493,7 @@ void boss5Rocket (edict_t *self)
vec[2] += self->enemy->viewheight;
// Lazarus fog reduction of accuracy
if(self->monsterinfo.visibility < FOG_CANSEEGOOD)
if (self->monsterinfo.visibility < FOG_CANSEEGOOD)
{
vec[0] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
vec[1] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
@ -533,7 +533,7 @@ void boss5MachineGun (edict_t *self)
vec[2] += self->enemy->viewheight;
// Lazarus fog reduction of accuracy
if(self->monsterinfo.visibility < FOG_CANSEEGOOD)
if (self->monsterinfo.visibility < FOG_CANSEEGOOD)
{
vec[0] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
vec[1] += crandom() * 640 * (FOG_CANSEEGOOD - self->monsterinfo.visibility);
@ -623,10 +623,10 @@ void boss5_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage
//PGM
qboolean boss5_blocked (edict_t *self, float dist)
{
if(blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
if (blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
return true;
if(blocked_checkplat (self, dist))
if (blocked_checkplat (self, dist))
return true;
return false;
@ -673,11 +673,11 @@ void SP_monster_boss5 (edict_t *self)
VectorSet (self->mins, -64, -64, 0);
VectorSet (self->maxs, 64, 64, 112);
if(!self->health)
if (!self->health)
self->health = 1500;
if(!self->gib_health)
if (!self->gib_health)
self->gib_health = -999;
if(!self->mass)
if (!self->mass)
self->mass = 800;
self->pain = boss5_pain;
@ -703,7 +703,7 @@ void SP_monster_boss5 (edict_t *self)
self->monsterinfo.scale = MODEL_SCALE;
// Lazarus
if(self->powerarmor)
if (self->powerarmor)
{
if (self->powerarmortype == 1)
self->monsterinfo.power_armor_type = POWER_ARMOR_SCREEN;

View file

@ -296,15 +296,15 @@ vec3_t monster_flash_offset [] =
// MZ2_JORG_BFG_1 132
6.3, -9, 111.2,
// MZ2_BOSS2_MACHINEGUN_R1 73
// MZ2_BOSS2_MACHINEGUN_R1 133
32, 40, 70,
// MZ2_BOSS2_MACHINEGUN_R2 74
// MZ2_BOSS2_MACHINEGUN_R2 134
32, 40, 70,
// MZ2_BOSS2_MACHINEGUN_R3 75
// MZ2_BOSS2_MACHINEGUN_R3 135
32, 40, 70,
// MZ2_BOSS2_MACHINEGUN_R4 76
// MZ2_BOSS2_MACHINEGUN_R4 137
32, 40, 70,
// MZ2_BOSS2_MACHINEGUN_R5 77
// MZ2_BOSS2_MACHINEGUN_R5 137
32, 40, 70,
// --- End Xian Shit ---
@ -312,11 +312,11 @@ vec3_t monster_flash_offset [] =
// ROGUE
// note that the above really ends at 137
// carrier machineguns
// MZ2_CARRIER_MACHINEGUN_L1
// MZ2_CARRIER_MACHINEGUN_L1 138
56, -32, 32,
// MZ2_CARRIER_MACHINEGUN_R1
// MZ2_CARRIER_MACHINEGUN_R1 139
56, 32, 32,
// MZ2_CARRIER_GRENADE
// MZ2_CARRIER_GRENADE 140
42, 24, 50,
// MZ2_TURRET_MACHINEGUN 141
16, 0, 0,
@ -465,42 +465,112 @@ vec3_t monster_flash_offset [] =
58.29, 27.11, 92.00,
// Knightmare added
// MZ2_SOLDIER_HYPERBLASTER_1 211
// MZ2_SOLDIER_IONRIPPER_1 211
10.6 * 1.2, 7.7 * 1.2, 7.8 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_2 212
// MZ2_SOLDIER_IONRIPPER_2 212
21.1 * 1.2, 3.6 * 1.2, 19.0 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_3 213
// MZ2_SOLDIER_IONRIPPER_3 213
20.8 * 1.2, 10.1 * 1.2, -2.7 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_4 214
// MZ2_SOLDIER_IONRIPPER_4 214
7.6 * 1.2, 9.3 * 1.2, 0.8 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_5 215
// MZ2_SOLDIER_IONRIPPER_5 215
30.5 * 1.2, 9.9 * 1.2, -18.7 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_6 216
// MZ2_SOLDIER_IONRIPPER_6 216
27.6 * 1.2, 3.4 * 1.2, -10.4 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_7 217
// MZ2_SOLDIER_IONRIPPER_7 217
28.9 * 1.2, 4.6 * 1.2, -8.1 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_8 218
// MZ2_SOLDIER_IONRIPPER_8 218
31.5 * 1.2, 9.6 * 1.2, 10.1 * 1.2,
// MZ2_GLADBETA_PHALANX_1 219
// MZ2_SOLDIER_HYPERBLASTER_1 219
10.6 * 1.2, 7.7 * 1.2, 7.8 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_2 220
21.1 * 1.2, 3.6 * 1.2, 19.0 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_3 221
20.8 * 1.2, 10.1 * 1.2, -2.7 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_4 222
7.6 * 1.2, 9.3 * 1.2, 0.8 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_5 223
30.5 * 1.2, 9.9 * 1.2, -18.7 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_6 224
27.6 * 1.2, 3.4 * 1.2, -10.4 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_7 225
28.9 * 1.2, 4.6 * 1.2, -8.1 * 1.2,
// MZ2_SOLDIER_HYPERBLASTER_8 226
31.5 * 1.2, 9.6 * 1.2, 10.1 * 1.2,
// MZ2_GLADBETA_PHALANX_1 227
30.0, 18.0, 28.0,
// MZ2_TURRET_RAILGUN_1 220
// MZ2_TURRET_RAILGUN_1 228
16, 0, 0,
// MZ2_GUNNER_ETF_RIFLE_1 221
// MZ2_GUNNER_ETF_RIFLE_1 229
30.1 * 1.15, 3.9 * 1.15, 19.6 * 1.15,
// MZ2_GUNNER_ETF_RIFLE_2 222
// MZ2_GUNNER_ETF_RIFLE_2 230
29.1 * 1.15, 2.5 * 1.15, 20.7 * 1.15,
// MZ2_GUNNER_ETF_RIFLE_3 223
// MZ2_GUNNER_ETF_RIFLE_3 231
28.2 * 1.15, 2.5 * 1.15, 22.2 * 1.15,
// MZ2_GUNNER_ETF_RIFLE_4 224
// MZ2_GUNNER_ETF_RIFLE_4 232
28.2 * 1.15, 3.6 * 1.15, 22.0 * 1.15,
// MZ2_GUNNER_ETF_RIFLE_5 225
// MZ2_GUNNER_ETF_RIFLE_5 233
26.9 * 1.15, 2.0 * 1.15, 23.4 * 1.15,
// MZ2_GUNNER_ETF_RIFLE_6 226
// MZ2_GUNNER_ETF_RIFLE_6 234
26.5 * 1.15, 0.6 * 1.15, 20.8 * 1.15,
// MZ2_GUNNER_ETF_RIFLE_7 227
// MZ2_GUNNER_ETF_RIFLE_7 235
26.9 * 1.15, 0.5 * 1.15, 21.5 * 1.15,
// MZ2_GUNNER_ETF_RIFLE_8 228
// MZ2_GUNNER_ETF_RIFLE_8 236
29.0 * 1.15, 2.4 * 1.15, 19.5 * 1.15,
// MZ2_UNUSED_1 237
1.0, 1.0, 1.0,
// MZ2_UNUSED_2 238
1.0, 1.0, 1.0,
// MZ2_UNUSED_3 239
1.0, 1.0, 1.0,
// MZ2_UNUSED_4 240
1.0, 1.0, 1.0,
// MZ2_UNUSED_5 241
1.0, 1.0, 1.0,
// MZ2_UNUSED_6 242
1.0, 1.0, 1.0,
// MZ2_UNUSED_7 243
1.0, 1.0, 1.0,
// MZ2_UNUSED_8 244
1.0, 1.0, 1.0,
// MZ2_UNUSED_9 245
1.0, 1.0, 1.0,
// MZ2_UNUSED_10 246
1.0, 1.0, 1.0,
// MZ2_UNUSED_11 247
1.0, 1.0, 1.0,
// MZ2_UNUSED_12 248
1.0, 1.0, 1.0,
// MZ2_UNUSED_13 249
1.0, 1.0, 1.0,
// MZ2_UNUSED_14 250
1.0, 1.0, 1.0,
// MZ2_UNUSED_15 251
1.0, 1.0, 1.0,
// MZ2_UNUSED_16 252
1.0, 1.0, 1.0,
// MZ2_UNUSED_17 253
1.0, 1.0, 1.0,
// MZ2_UNUSED_18 254
1.0, 1.0, 1.0,
// MZ2_SEND_SHORT 255
1.0, 1.0, 1.0,
// MZ2_SOLDIER_PLASMA_RIFLE_1 256
10.6 * 1.2, 7.7 * 1.2, 7.8 * 1.2,
// MZ2_SOLDIER_PLASMA_RIFLE_2 257
21.1 * 1.2, 3.6 * 1.2, 19.0 * 1.2,
// MZ2_SOLDIER_PLASMA_RIFLE_3 258
20.8 * 1.2, 10.1 * 1.2, -2.7 * 1.2,
// MZ2_SOLDIER_PLASMA_RIFLE_4 259
7.6 * 1.2, 9.3 * 1.2, 0.8 * 1.2,
// MZ2_SOLDIER_PLASMA_RIFLE_5 260
30.5 * 1.2, 9.9 * 1.2, -18.7 * 1.2,
// MZ2_SOLDIER_PLASMA_RIFLE_6 261
27.6 * 1.2, 3.4 * 1.2, -10.4 * 1.2,
// MZ2_SOLDIER_PLASMA_RIFLE_7 262
28.9 * 1.2, 4.6 * 1.2, -8.1 * 1.2,
// MZ2_SOLDIER_PLASMA_RIFLE_8 263
31.5 * 1.2, 9.6 * 1.2, 10.1 * 1.2,
// end Knightmare
// end of table

View file

@ -495,6 +495,8 @@ static int blaster_flash [] = {MZ2_SOLDIER_BLASTER_1, MZ2_SOLDIER_BLASTER_2, MZ2
static int shotgun_flash [] = {MZ2_SOLDIER_SHOTGUN_1, MZ2_SOLDIER_SHOTGUN_2, MZ2_SOLDIER_SHOTGUN_3, MZ2_SOLDIER_SHOTGUN_4, MZ2_SOLDIER_SHOTGUN_5, MZ2_SOLDIER_SHOTGUN_6, MZ2_SOLDIER_SHOTGUN_7, MZ2_SOLDIER_SHOTGUN_8};
static int machinegun_flash [] = {MZ2_SOLDIER_MACHINEGUN_1, MZ2_SOLDIER_MACHINEGUN_2, MZ2_SOLDIER_MACHINEGUN_3, MZ2_SOLDIER_MACHINEGUN_4, MZ2_SOLDIER_MACHINEGUN_5, MZ2_SOLDIER_MACHINEGUN_6, MZ2_SOLDIER_MACHINEGUN_7, MZ2_SOLDIER_MACHINEGUN_8};
#ifdef KMQUAKE2_ENGINE_MOD
static int plasma_rifle_flash [] = {MZ2_SOLDIER_PLASMA_RIFLE_1, MZ2_SOLDIER_PLASMA_RIFLE_2, MZ2_SOLDIER_PLASMA_RIFLE_3, MZ2_SOLDIER_PLASMA_RIFLE_4, MZ2_SOLDIER_PLASMA_RIFLE_5, MZ2_SOLDIER_PLASMA_RIFLE_6, MZ2_SOLDIER_PLASMA_RIFLE_7, MZ2_SOLDIER_PLASMA_RIFLE_8};
static int ionripper_flash [] = {MZ2_SOLDIER_IONRIPPER_1, MZ2_SOLDIER_IONRIPPER_2, MZ2_SOLDIER_IONRIPPER_3, MZ2_SOLDIER_IONRIPPER_4, MZ2_SOLDIER_IONRIPPER_5, MZ2_SOLDIER_IONRIPPER_6, MZ2_SOLDIER_IONRIPPER_7, MZ2_SOLDIER_IONRIPPER_8};
static int hyperblaster_flash [] = {MZ2_SOLDIER_HYPERBLASTER_1, MZ2_SOLDIER_HYPERBLASTER_2, MZ2_SOLDIER_HYPERBLASTER_3, MZ2_SOLDIER_HYPERBLASTER_4, MZ2_SOLDIER_HYPERBLASTER_5, MZ2_SOLDIER_HYPERBLASTER_6, MZ2_SOLDIER_HYPERBLASTER_7, MZ2_SOLDIER_HYPERBLASTER_8};
#endif // KMQUAKE2_ENGINE_MOD
@ -540,7 +542,11 @@ void soldier_fire (edict_t *self, int in_flash_number)
else if (self->skinnum < 6)
flash_index = machinegun_flash[flash_number];
else // if (self->skinnum < 8)
#ifdef KMQUAKE2_ENGINE_MOD
flash_index = plasma_rifle_flash[flash_number];
#else
flash_index = blaster_flash[flash_number];
#endif // KMQUAKE2_ENGINE_MOD
AngleVectors (self->s.angles, forward, right, NULL);
G_ProjectSource (self->s.origin, monster_flash_offset[flash_index], forward, right, start);
@ -2098,7 +2104,11 @@ void soldierh_fire (edict_t *self, int flash_number)
// if ((self->s.skinnum % 6) < 2)
if (self->skinnum < 2)
#ifdef KMQUAKE2_ENGINE_MOD
flash_index = ionripper_flash[flash_number]; // ripper
#else
flash_index = blaster_flash[flash_number]; // ripper
#endif // KMQUAKE2_ENGINE_MOD
// else if ((self->s.skinnum % 6) < 4)
else if (self->skinnum < 4)
#ifdef KMQUAKE2_ENGINE_MOD
@ -2158,9 +2168,9 @@ void soldierh_fire (edict_t *self, int flash_number)
// else if ((self->s.skinnum % 6) <= 3)
else if (self->skinnum <= 3)
{
// monster_fire_blaster (self, start, aim, 4, 600, flash_index, EF_BLUEHYPERBLASTER, BLASTER_BLUE);
monster_fire_blaster (self, start, aim, 4, 600, flash_index, EF_BLUEHYPERBLASTER, BLASTER_BLUE);
// monster_fire_blueblaster (self, start, aim, 4, 600, MZ_BLUEHYPERBLASTER, EF_BLUEHYPERBLASTER);
monster_fire_blueblaster (self, start, aim, 4, 600, flash_index, EF_BLUEHYPERBLASTER); // Knightmare- use an actual monster muzzleflash here!
// monster_fire_blueblaster (self, start, aim, 4, 600, flash_index, EF_BLUEHYPERBLASTER); // Knightmare- use an actual monster muzzleflash here!
}
else // if (self->skinnum <= 5)
{
@ -3258,7 +3268,11 @@ void SP_monster_soldier_plasma_re (edict_t *self)
sound_pain_ss = gi.soundindex ("soldier/solpain3.wav");
sound_death_ss = gi.soundindex ("soldier/soldeth3.wav");
gi.modelindex (PLASMA_SPRITE_FLY);
#ifdef KMQUAKE2_ENGINE_MOD
gi.soundindex ("weapons/plasma/fire1.wav");
#else
gi.soundindex ("soldier/solatck2.wav");
#endif // KMQUAKE2_ENGINE_MOD
self->common_name = "Plasma Guard";
self->class_id = ENTITY_MONSTER_SOLDIER_PLASMA_BOUNCE;
@ -3292,7 +3306,11 @@ void SP_monster_soldier_plasma_sp (edict_t *self)
sound_pain_ss = gi.soundindex ("soldier/solpain3.wav");
sound_death_ss = gi.soundindex ("soldier/soldeth3.wav");
gi.modelindex (PLASMA_SPRITE_FLY);
#ifdef KMQUAKE2_ENGINE_MOD
gi.soundindex ("weapons/plasma/fire2.wav");
#else
gi.soundindex ("soldier/solatck2.wav");
#endif // KMQUAKE2_ENGINE_MOD
self->common_name = "Plasma Guard";
self->class_id = ENTITY_MONSTER_SOLDIER_PLASMA_SPREAD;
@ -3406,7 +3424,11 @@ void SP_monster_soldier_ripper (edict_t *self)
gi.modelindex ("models/objects/boomrang/tris.md2");
gi.soundindex ("misc/lasfly.wav");
#ifdef KMQUAKE2_ENGINE_MOD
gi.soundindex ("weapons/rippfire.wav");
#else
gi.soundindex ("soldier/solatck2.wav");
#endif // KMQUAKE2_ENGINE_MOD
self->common_name = "Ripper Guard";
self->class_id = ENTITY_MONSTER_SOLDIER_RIPPER;

View file

@ -3613,7 +3613,7 @@ void weapon_plasma_rifle_fire (edict_t *ent, qboolean altfire)
{
vec3_t offset, start;
vec3_t forward, right;
int damage;
int damage, muzzleflash;
if ( ent->client->pers.plasma_mode ) {
if (deathmatch->value) // tone down for deathmatch
@ -3669,11 +3669,17 @@ void weapon_plasma_rifle_fire (edict_t *ent, qboolean altfire)
// end Zaero
if ( ent->client->pers.plasma_mode ) {
muzzleflash = MZ_PLASMA_RIFLE_SPREAD;
#ifndef KMQUAKE2_ENGINE_MOD
gi.sound( ent, CHAN_WEAPON, gi.soundindex(PLASMA_SOUND_FIRE2), 1, ATTN_NORM,0 );
#endif // KMQUAKE2_ENGINE_MOD
fire_plasma_rifle (ent, start, forward, damage, (int)sk_plasma_rifle_speed_spread->value, true);
}
else {
muzzleflash = MZ_PLASMA_RIFLE_BOUNCE;
#ifndef KMQUAKE2_ENGINE_MOD
gi.sound( ent, CHAN_WEAPON, gi.soundindex(PLASMA_SOUND_FIRE1), 1, ATTN_NORM,0 );
#endif // KMQUAKE2_ENGINE_MOD
fire_plasma_rifle (ent, start, forward, damage, (int)sk_plasma_rifle_speed_bounce->value, false);
}
@ -3684,14 +3690,16 @@ void weapon_plasma_rifle_fire (edict_t *ent, qboolean altfire)
ent->client->v_dmg_pitch = -2;
ent->client->v_dmg_roll = crandom()*2;
ent->client->v_dmg_time = level.time + DAMAGE_TIME;
}
//-bat Silence??
// send muzzle flash
//gi.WriteByte (svc_muzzleflash);
//gi.WriteShort (ent-g_edicts);
//gi.WriteByte (MZ_ROCKET | is_silenced);
//gi.multicast (ent->s.origin, MULTICAST_PVS);
//-bat Silence??
// send muzzle flash
#ifdef KMQUAKE2_ENGINE_MOD
gi.WriteByte (svc_muzzleflash);
gi.WriteShort (ent-g_edicts);
gi.WriteByte (muzzleflash | is_silenced);
gi.multicast (ent->s.origin, MULTICAST_PVS);
#endif // KMQUAKE2_ENGINE_MOD
}
ent->client->ps.gunframe++;

View file

@ -806,6 +806,8 @@ typedef struct
#define MZ_GREENHYPERBLASTER 41
#define MZ_REDBLASTER 42
#define MZ_REDHYPERBLASTER 43
#define MZ_PLASMA_RIFLE_BOUNCE 44
#define MZ_PLASMA_RIFLE_SPREAD 45
#define MZ_SEND_SHORT 127 // send this value as a flag to read real index as a short
@ -1045,26 +1047,43 @@ typedef struct
// ROGUE
// Knightmare added
#define MZ2_SOLDIER_HYPERBLASTER_1 211
#define MZ2_SOLDIER_HYPERBLASTER_2 212
#define MZ2_SOLDIER_HYPERBLASTER_3 213
#define MZ2_SOLDIER_HYPERBLASTER_4 214
#define MZ2_SOLDIER_HYPERBLASTER_5 215
#define MZ2_SOLDIER_HYPERBLASTER_6 216
#define MZ2_SOLDIER_HYPERBLASTER_7 217
#define MZ2_SOLDIER_HYPERBLASTER_8 218
#define MZ2_GLADBETA_PHALANX_1 219
#define MZ2_TURRET_RAILGUN_1 220
#define MZ2_GUNNER_ETF_RIFLE_1 221
#define MZ2_GUNNER_ETF_RIFLE_2 222
#define MZ2_GUNNER_ETF_RIFLE_3 223
#define MZ2_GUNNER_ETF_RIFLE_4 224
#define MZ2_GUNNER_ETF_RIFLE_5 225
#define MZ2_GUNNER_ETF_RIFLE_6 226
#define MZ2_GUNNER_ETF_RIFLE_7 227
#define MZ2_GUNNER_ETF_RIFLE_8 228
#define MZ2_SOLDIER_IONRIPPER_1 211
#define MZ2_SOLDIER_IONRIPPER_2 212
#define MZ2_SOLDIER_IONRIPPER_3 213
#define MZ2_SOLDIER_IONRIPPER_4 214
#define MZ2_SOLDIER_IONRIPPER_5 215
#define MZ2_SOLDIER_IONRIPPER_6 216
#define MZ2_SOLDIER_IONRIPPER_7 217
#define MZ2_SOLDIER_IONRIPPER_8 218
#define MZ2_SOLDIER_HYPERBLASTER_1 219
#define MZ2_SOLDIER_HYPERBLASTER_2 220
#define MZ2_SOLDIER_HYPERBLASTER_3 221
#define MZ2_SOLDIER_HYPERBLASTER_4 222
#define MZ2_SOLDIER_HYPERBLASTER_5 223
#define MZ2_SOLDIER_HYPERBLASTER_6 224
#define MZ2_SOLDIER_HYPERBLASTER_7 225
#define MZ2_SOLDIER_HYPERBLASTER_8 226
#define MZ2_GLADBETA_PHALANX_1 227
#define MZ2_TURRET_RAILGUN_1 228
#define MZ2_GUNNER_ETF_RIFLE_1 229
#define MZ2_GUNNER_ETF_RIFLE_2 230
#define MZ2_GUNNER_ETF_RIFLE_3 231
#define MZ2_GUNNER_ETF_RIFLE_4 232
#define MZ2_GUNNER_ETF_RIFLE_5 233
#define MZ2_GUNNER_ETF_RIFLE_6 234
#define MZ2_GUNNER_ETF_RIFLE_7 235
#define MZ2_GUNNER_ETF_RIFLE_8 236
#define MZ2_SEND_SHORT 255 // send this value as a flag to read real index as a short
#define MZ2_SOLDIER_PLASMA_RIFLE_1 256
#define MZ2_SOLDIER_PLASMA_RIFLE_2 257
#define MZ2_SOLDIER_PLASMA_RIFLE_3 258
#define MZ2_SOLDIER_PLASMA_RIFLE_4 259
#define MZ2_SOLDIER_PLASMA_RIFLE_5 260
#define MZ2_SOLDIER_PLASMA_RIFLE_6 261
#define MZ2_SOLDIER_PLASMA_RIFLE_7 262
#define MZ2_SOLDIER_PLASMA_RIFLE_8 263
// end Knightmare
extern vec3_t monster_flash_offset [];