mirror of
https://github.com/OpenArena/gamecode
synced 2026-08-20 18:23:03 -04:00
Updated with the new gamecode.
This commit is contained in:
parent
b9a61dbe45
commit
0d1031fe2d
4 changed files with 46 additions and 6 deletions
|
|
@ -1863,7 +1863,7 @@ void ClientSpawn(gentity_t *ent) {
|
|||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_BFG );
|
||||
client->ps.ammo[WP_BFG] = g_elimination_bfg.integer;
|
||||
}
|
||||
if (g_elimination_grapple.integer) {
|
||||
if (g_elimination_grapple.integer) {
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRAPPLING_HOOK );
|
||||
}
|
||||
if (g_elimination_nail.integer > 0) {
|
||||
|
|
@ -1882,21 +1882,31 @@ void ClientSpawn(gentity_t *ent) {
|
|||
ent->health = client->ps.stats[STAT_ARMOR] = g_elimination_startArmor.integer; //client->ps.stats[STAT_MAX_HEALTH]*2;
|
||||
ent->health = client->ps.stats[STAT_HEALTH] = g_elimination_startHealth.integer; //client->ps.stats[STAT_MAX_HEALTH]*2;
|
||||
}
|
||||
//Instantgib mode, replace weapons with rail (and maybe gauntlet)
|
||||
//Instantgib mode, replace weapons with rail (and maybe gauntlet and/or grappling hook)
|
||||
if(g_instantgib.integer)
|
||||
{
|
||||
client->ps.stats[STAT_WEAPONS] = ( 1 << WP_RAILGUN );
|
||||
client->ps.ammo[WP_RAILGUN] = 999; //Don't display any ammo
|
||||
if(g_instantgib.integer>1)
|
||||
{
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GAUNTLET );
|
||||
client->ps.ammo[WP_GAUNTLET] = -1;
|
||||
/* Neon_Knight: In grappleAll mode, Instagib is played with Grapple. */
|
||||
if (g_grapple.integer != 0 && g_grappleAll.integer != 0) {
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRAPPLING_HOOK);
|
||||
}
|
||||
/* / Neon_Knight */
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GAUNTLET );
|
||||
client->ps.ammo[WP_GAUNTLET] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
//nexuiz style rocket arena (rocket launcher only)
|
||||
if(g_rockets.integer)
|
||||
{
|
||||
/* Neon_Knight: In grappleAll mode, All Rockets is played with Grapple. */
|
||||
if (g_grapple.integer != 0 && g_grappleAll.integer != 0) {
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRAPPLING_HOOK);
|
||||
}
|
||||
/* / Neon_Knight */
|
||||
client->ps.stats[STAT_WEAPONS] = ( 1 << WP_ROCKET_LAUNCHER );
|
||||
client->ps.ammo[WP_ROCKET_LAUNCHER] = 999;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -855,12 +855,23 @@ void ClearRegisteredItems( void )
|
|||
memset( itemRegistered, 0, sizeof( itemRegistered ) );
|
||||
|
||||
if(g_instantgib.integer) {
|
||||
if(g_instantgib.integer & 2)
|
||||
if(g_instantgib.integer & 2) {
|
||||
RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
|
||||
}
|
||||
/* Neon_Knight: In grappleAll mode, the Grapple is added to the starting inventory in Instagib. */
|
||||
if (g_grapple.integer != 0 && g_grappleAll.integer != 0) {
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRAPPLING_HOOK);
|
||||
}
|
||||
/* / Neon_Knight */
|
||||
//RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_RAILGUN ) );
|
||||
}
|
||||
else if(g_rockets.integer) {
|
||||
/* Neon_Knight: In grappleAll mode, the Grapple is added to the starting inventory in All Rockets. */
|
||||
if (g_grapple.integer != 0 && g_grappleAll.integer != 0) {
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRAPPLING_HOOK);
|
||||
}
|
||||
/* / Neon_Knight */
|
||||
//RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
|
||||
//RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_ROCKET_LAUNCHER ) );
|
||||
|
|
@ -869,6 +880,11 @@ void ClearRegisteredItems( void )
|
|||
// players always start with the base weapon
|
||||
RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
|
||||
/* Neon_Knight: In grapple mode, the Grapple is added to the starting inventory. */
|
||||
if (g_grapple.integer != 0 && g_grappleAll.integer != 0) {
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRAPPLING_HOOK);
|
||||
}
|
||||
/* / Neon_Knight */
|
||||
if(g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_CTF_ELIMINATION
|
||||
|| g_gametype.integer == GT_LMS || g_elimination_allgametypes.integer) {
|
||||
RegisterItem( BG_FindItemForWeapon( WP_SHOTGUN ) );
|
||||
|
|
|
|||
|
|
@ -1191,6 +1191,10 @@ extern vmCvar_t g_warningExpire;
|
|||
extern vmCvar_t g_minNameChangePeriod;
|
||||
extern vmCvar_t g_maxNameChanges;
|
||||
|
||||
/* Neon_Knight: Adding cvar for (de)activation of the Grappling Hook */
|
||||
extern vmCvar_t g_grapple;
|
||||
extern vmCvar_t g_grappleAll;
|
||||
/* /Neon_Knight */
|
||||
|
||||
void trap_Printf( const char *fmt );
|
||||
void trap_Error( const char *fmt ) __attribute__((noreturn));
|
||||
|
|
|
|||
|
|
@ -204,6 +204,11 @@ vmCvar_t g_execute_gametype_script;
|
|||
vmCvar_t g_emptyCommand;
|
||||
vmCvar_t g_emptyTime;
|
||||
|
||||
/* Neon_Knight: Adding cvar for (de)activation of the Grappling Hook. */
|
||||
vmCvar_t g_grapple;
|
||||
vmCvar_t g_grappleAll;
|
||||
/* /Neon_Knight */
|
||||
|
||||
mapinfo_result_t mapinfo;
|
||||
|
||||
// bk001129 - made static to avoid aliasing
|
||||
|
|
@ -411,7 +416,12 @@ static cvarTable_t gameCvarTable[] = {
|
|||
{ &g_timestamp_startgame, "g_timestamp", "0001-01-01 00:00:00", CVAR_SERVERINFO, 0, qfalse},
|
||||
{ &g_execute_gametype_script, "g_egs", "0", CVAR_ROM, 0, qfalse },
|
||||
{ &g_emptyCommand, "g_emptyCommand", "map_restart", CVAR_ARCHIVE, 0, qfalse},
|
||||
{ &g_emptyTime, "g_emptytime", "0", CVAR_ARCHIVE, 0, qfalse}
|
||||
{ &g_emptyTime, "g_emptytime", "0", CVAR_ARCHIVE, 0, qfalse},
|
||||
|
||||
/* Neon_Knight: Adding a cvar for the (de)activation of the Grappling Hook. */
|
||||
{ &g_grapple, "g_grapple", "0", CVAR_ARCHIVE | CVAR_LATCH | CVAR_NORESTART, 0, qfalse},
|
||||
{ &g_grappleAll, "g_grappleAll", "0", CVAR_ARCHIVE | CVAR_NORESTART, 0, qfalse},
|
||||
/* /Neon_Knight */
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue