mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-31 13:50:55 +00:00
Elder:
Updates corresponding to VM Builds 0-02-01 to 0-02-03 Contains the server crash fix
This commit is contained in:
parent
316a3ae002
commit
a02ee98e97
6 changed files with 59 additions and 39 deletions
|
@ -56,7 +56,7 @@ gitem_t bg_itemlist[] =
|
|||
"sound/misc/am_pkup.wav",
|
||||
{"models/weapons2/knife/knife.md3",0,0,0},
|
||||
"icons/iconw_knife",
|
||||
"Knife",
|
||||
RQ3_KNIFE_NAME,
|
||||
1,
|
||||
IT_WEAPON,
|
||||
WP_KNIFE,
|
||||
|
@ -71,7 +71,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/mk23/mk23.md3",
|
||||
0, 0, 0},
|
||||
/* icon */ "icons/iconw_mk23",
|
||||
/* pickup */ "MK23",
|
||||
/* pickup */ RQ3_PISTOL_NAME,
|
||||
12,
|
||||
IT_WEAPON,
|
||||
WP_PISTOL,
|
||||
|
@ -86,7 +86,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/m4/m4.md3",
|
||||
0, 0, 0},
|
||||
/* icon */ "icons/iconw_m4",
|
||||
/* pickup */ "M4",
|
||||
/* pickup */ RQ3_M4_NAME,
|
||||
24,
|
||||
IT_WEAPON,
|
||||
WP_M4,
|
||||
|
@ -101,7 +101,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/ssg3000/ssg3000.md3",
|
||||
0, 0, 0},
|
||||
/* icon */ "icons/iconw_ssg",
|
||||
/* pickup */ "SSG3000",
|
||||
/* pickup */ RQ3_SSG3000_NAME,
|
||||
6,
|
||||
IT_WEAPON,
|
||||
WP_SSG3000,
|
||||
|
@ -116,7 +116,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/mp5/mp5.md3",
|
||||
0, 0, 0},
|
||||
/* icon */ "icons/iconw_mp5",
|
||||
/* pickup */ "MP5",
|
||||
/* pickup */ RQ3_MP5_NAME,
|
||||
30,
|
||||
IT_WEAPON,
|
||||
WP_MP5,
|
||||
|
@ -131,7 +131,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/handcannon/handcannon.md3",
|
||||
0, 0, 0},
|
||||
/* icon */ "icons/iconw_sawedoff",
|
||||
/* pickup */ "Hand Cannon",
|
||||
/* pickup */ RQ3_HANDCANNON_NAME,
|
||||
2,
|
||||
IT_WEAPON,
|
||||
WP_HANDCANNON,
|
||||
|
@ -146,7 +146,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/m3/m3.md3",
|
||||
0, 0, 0},
|
||||
/* icon */ "icons/iconw_m3",
|
||||
/* pickup */ "M3 Super Shotgun",
|
||||
/* pickup */ RQ3_M3_NAME,
|
||||
7,
|
||||
IT_WEAPON,
|
||||
WP_M3,
|
||||
|
@ -161,7 +161,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/akimbo/akimbo.md3",
|
||||
0, 0, 0},
|
||||
/* icon */ "icons/iconw_akimbo",
|
||||
/* pickup */ "Akimbo Pistols",
|
||||
/* pickup */ RQ3_AKIMBO_NAME,
|
||||
24,
|
||||
IT_WEAPON,
|
||||
WP_AKIMBO,
|
||||
|
@ -177,8 +177,8 @@ gitem_t bg_itemlist[] =
|
|||
"sound/misc/am_pkup.wav",
|
||||
{ "models/weapons2/grenade/grenade.md3",
|
||||
0, 0, 0},
|
||||
/* icon */ "icons/iconw_grenade",
|
||||
/* pickup */ "Grenade",
|
||||
/* icon */ "icons/iconw_gren",
|
||||
/* pickup */ RQ3_GRENADE_NAME,
|
||||
1,
|
||||
IT_WEAPON,
|
||||
WP_GRENADE,
|
||||
|
@ -193,7 +193,7 @@ gitem_t bg_itemlist[] =
|
|||
NULL,
|
||||
{"models/weapons2/knife/knife_3rd.md3",0,0,0},
|
||||
"icons/iconw_knife",
|
||||
"Knife",
|
||||
RQ3_KNIFE_NAME,
|
||||
1,
|
||||
IT_WEAPON,
|
||||
WP_KNIFE,
|
||||
|
@ -208,7 +208,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/mk23/mk23_3rd.md3",
|
||||
0, 0, 0},
|
||||
"icons/iconw_mk23",
|
||||
"MK23",
|
||||
RQ3_PISTOL_NAME,
|
||||
12,
|
||||
IT_WEAPON,
|
||||
WP_PISTOL,
|
||||
|
@ -223,7 +223,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/m4/m4_3rd.md3",
|
||||
0, 0, 0},
|
||||
"icons/iconw_m4",
|
||||
"M4",
|
||||
RQ3_M4_NAME,
|
||||
24,
|
||||
IT_WEAPON,
|
||||
WP_M4,
|
||||
|
@ -238,7 +238,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/ssg3000/ssg3000_3rd.md3",
|
||||
0, 0, 0},
|
||||
"icons/iconw_ssg",
|
||||
"SSG3000",
|
||||
RQ3_SSG3000_NAME,
|
||||
6,
|
||||
IT_WEAPON,
|
||||
WP_SSG3000,
|
||||
|
@ -253,7 +253,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/mp5/mp5_3rd.md3",
|
||||
0, 0, 0},
|
||||
"icons/iconw_mp5",
|
||||
"MP5",
|
||||
RQ3_MP5_NAME,
|
||||
30,
|
||||
IT_WEAPON,
|
||||
WP_MP5,
|
||||
|
@ -268,7 +268,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/handcannon/handcannon_3rd.md3",
|
||||
0, 0, 0},
|
||||
"icons/iconw_sawedoff",
|
||||
"Hand Cannon",
|
||||
RQ3_HANDCANNON_NAME,
|
||||
2,
|
||||
IT_WEAPON,
|
||||
WP_HANDCANNON,
|
||||
|
@ -283,7 +283,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/m3/m3_3rd.md3",
|
||||
0, 0, 0},
|
||||
"icons/iconw_m3",
|
||||
"M3 Super Shotgun",
|
||||
RQ3_M3_NAME,
|
||||
7,
|
||||
IT_WEAPON,
|
||||
WP_M3,
|
||||
|
@ -298,7 +298,7 @@ gitem_t bg_itemlist[] =
|
|||
{ "models/weapons2/akimbo/akimbo_3rd.md3",
|
||||
0, 0, 0},
|
||||
"icons/iconw_akimbo",
|
||||
"Akimbo Pistols",
|
||||
RQ3_AKIMBO_NAME,
|
||||
24,
|
||||
IT_WEAPON,
|
||||
WP_AKIMBO,
|
||||
|
@ -313,8 +313,8 @@ gitem_t bg_itemlist[] =
|
|||
NULL,
|
||||
{ "models/weapons2/grenade/grenade_3rd.md3",
|
||||
0, 0, 0},
|
||||
"icons/iconw_grenade",
|
||||
"Grenade",
|
||||
"icons/iconw_gren",
|
||||
RQ3_GRENADE_NAME,
|
||||
1,
|
||||
IT_WEAPON,
|
||||
WP_GRENADE,
|
||||
|
|
|
@ -1890,7 +1890,7 @@ static void PM_Weapon( void ) {
|
|||
|
||||
// Elder: fire on release - based on code from inolen
|
||||
// check for fire
|
||||
// if they are pressing attack and their current weapon is the railgun
|
||||
// if they are pressing attack and their current weapon is the grenade
|
||||
if ((pm->cmd.buttons & 1) && (pm->ps->weapon == WP_GRENADE) ) {
|
||||
pm->ps->weaponTime = 0;
|
||||
// put it in the "cocked" position
|
||||
|
@ -1973,6 +1973,14 @@ static void PM_Weapon( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
//Elder: M4 kick code
|
||||
//ent->client->ps.delta_angles[0] = ANGLE2SHORT(SHORT2ANGLE(ent->client->ps.delta_angles[0]) - 0.7);
|
||||
if ( pm->ps->weapon == WP_M4 && ((pm->ps->persistant[PERS_WEAPONMODES] & RQ3_M4MODE) != RQ3_M4MODE) )
|
||||
{
|
||||
pm->ps->delta_angles[0] = ANGLE2SHORT(SHORT2ANGLE(pm->ps->delta_angles[0]) - 0.7);
|
||||
}
|
||||
|
||||
//if ( ! pm->ps->ammo[ pm->ps->weapon ] ||
|
||||
//pm->ps->weapon == WP_AKIMBO && pm->ps->ammo[ pm->ps->weapon ] == 1) {
|
||||
//PM_AddEvent( EV_NOAMMO );
|
||||
|
|
|
@ -1497,17 +1497,22 @@ void ClientEndFrame( gentity_t *ent ) {
|
|||
}
|
||||
|
||||
|
||||
//Moved to pmove.c
|
||||
//Elder: M4 ride-up/kick -- condition for non-burst and ammo only
|
||||
if ( ent->client->ps.weapon == WP_M4 && ent->client->ps.ammo[WP_M4] > 0 &&
|
||||
(ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_M4MODE) != RQ3_M4MODE &&
|
||||
(ent->client->buttons & BUTTON_ATTACK) == BUTTON_ATTACK)
|
||||
{
|
||||
//if ( ent->client->ps.weapon == WP_M4 && ent->client->ps.ammo[WP_M4] > 0 &&
|
||||
//(ent->client->ps.persistant[PERS_WEAPONMODES] & RQ3_M4MODE) != RQ3_M4MODE &&
|
||||
//ent->client->ps.weaponstate == WEAPON_FIRING)
|
||||
//(ent->client->buttons & BUTTON_ATTACK) == BUTTON_ATTACK)
|
||||
//{
|
||||
//G_Printf("bullets: %d, viewangle: %f\n", ent->client->consecutiveShots, ent->client->ps.viewangles[0]);
|
||||
ent->client->ps.delta_angles[0] = ANGLE2SHORT(SHORT2ANGLE(ent->client->ps.delta_angles[0]) - 0.7);
|
||||
}
|
||||
else if (ent->client->consecutiveShots)
|
||||
//ent->client->ps.delta_angles[0] = ANGLE2SHORT(SHORT2ANGLE(ent->client->ps.delta_angles[0]) - 0.7);
|
||||
//}
|
||||
//else if (ent->client->consecutiveShots)
|
||||
|
||||
if (ent->client->consecutiveShots &&
|
||||
(ent->client->ps.ammo[WP_M4] <= 0 || ent->client->ps.weaponstate != WEAPON_FIRING))
|
||||
{
|
||||
//Restore view after shots
|
||||
//Restore view after shots if not firing
|
||||
ent->client->ps.delta_angles[0] = ANGLE2SHORT(SHORT2ANGLE(ent->client->ps.delta_angles[0]) - ent->client->consecutiveShots * -0.7);
|
||||
ent->client->consecutiveShots = 0;
|
||||
}
|
||||
|
|
|
@ -961,7 +961,7 @@ and on transition between teams, but doesn't happen on respawns
|
|||
void ClientBegin( int clientNum ) {
|
||||
gentity_t *ent;
|
||||
gclient_t *client;
|
||||
gentity_t *tent;
|
||||
//gentity_t *tent;
|
||||
int flags;
|
||||
|
||||
ent = g_entities + clientNum;
|
||||
|
@ -989,12 +989,6 @@ void ClientBegin( int clientNum ) {
|
|||
memset( &client->ps, 0, sizeof( client->ps ) );
|
||||
client->ps.eFlags = flags;
|
||||
|
||||
//Elder: added to initialize weaponmodes
|
||||
client->ps.persistant[PERS_WEAPONMODES] |= RQ3_GRENSHORT; //set to short range
|
||||
client->ps.persistant[PERS_WEAPONMODES] |= RQ3_KNIFEMODE; //set to slash attack
|
||||
//Elder: debug
|
||||
//G_Printf("In clientbegin- PERS_WEAPONMODES: %d\n", ent->client->ps.persistant[PERS_WEAPONMODES]);
|
||||
|
||||
// locate ent at a spawn point
|
||||
ClientSpawn( ent );
|
||||
|
||||
|
@ -1002,7 +996,14 @@ void ClientBegin( int clientNum ) {
|
|||
// send event
|
||||
//Elder: removed
|
||||
//tent = G_TempEntity( ent->client->ps.origin, EV_PLAYER_TELEPORT_IN );
|
||||
tent->s.clientNum = ent->s.clientNum;
|
||||
//tent->s.clientNum = ent->s.clientNum;
|
||||
|
||||
//Elder: moved after ClientSpawn call
|
||||
//Elder: added to initialize weaponmodes
|
||||
client->ps.persistant[PERS_WEAPONMODES] |= RQ3_GRENSHORT; //set to short range
|
||||
client->ps.persistant[PERS_WEAPONMODES] |= RQ3_KNIFEMODE; //set to slash attack
|
||||
//Elder: debug
|
||||
//G_Printf("In clientbegin- PERS_WEAPONMODES: %d\n", ent->client->ps.persistant[PERS_WEAPONMODES]);
|
||||
|
||||
if ( g_gametype.integer != GT_TOURNAMENT ) {
|
||||
trap_SendServerCommand( -1, va("print \"%s" S_COLOR_WHITE " entered the game\n\"", client->pers.netname) );
|
||||
|
@ -1253,8 +1254,10 @@ void ClientSpawn(gentity_t *ent) {
|
|||
|
||||
//Elder: reset all RQ3 non-persistent stats
|
||||
ent->client->ps.stats[STAT_RQ3] = 0;
|
||||
|
||||
//Elder: set weaponfireNextTime amount
|
||||
client->weaponfireNextTime = 0;
|
||||
|
||||
//Elder: Initialize fast reloads stuff
|
||||
client->fastReloads = 0;
|
||||
client->lastReloadTime = 0;
|
||||
|
|
|
@ -1681,7 +1681,11 @@ void Cmd_Reload( gentity_t *ent ) {
|
|||
trap_SendServerCommand( ent-g_entities, va("print \"You are too busy bandaging...\n\""));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Elder: release fire button
|
||||
//if ( (ent->client->buttons & BUTTON_ATTACK) == BUTTON_ATTACK)
|
||||
//ent->client->buttons &= ~BUTTON_ATTACK;
|
||||
|
||||
weapon = ent->client->ps.weapon;
|
||||
//Elder: changed to new function
|
||||
ammotoadd = ClipAmountForReload(weapon);
|
||||
|
|
|
@ -396,7 +396,7 @@ void G_BreakGlass(gentity_t *ent, vec3_t point, int mod) {
|
|||
|
||||
//Elder:
|
||||
//eventParm can only hold a byte (8-bits/255)
|
||||
//So if we receive a huge one, we can knock it down (and-op)
|
||||
//So if we receive a huge one, we can knock it down (shift-op)
|
||||
//and count the number of times
|
||||
//Once it's below 255, we can send a more appropriate event
|
||||
//This way, the mappers can use a single func_breakable
|
||||
|
|
Loading…
Reference in a new issue