Update copyright information
Remove pmodel attributes from the player class. Fix shotgun and DML menu. Add fix for the gauss-pistol triggering a client-side fire upon closing the menu.
This commit is contained in:
parent
1ee8be9c9f
commit
92ac106b5d
31 changed files with 123 additions and 57 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
../../../src/shared/fteextensions.qc
|
../../../src/shared/fteextensions.qc
|
||||||
../../../src/shared/defs.h
|
../../../src/shared/defs.h
|
||||||
../../../src/server/defs.h
|
../../../src/server/defs.h
|
||||||
|
../../../src/botlib/botinfo.h
|
||||||
|
|
||||||
../../../src/gs-entbase/server.src
|
../../../src/gs-entbase/server.src
|
||||||
../../../src/gs-entbase/shared.src
|
../../../src/gs-entbase/shared.src
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2021 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2021 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -80,12 +80,6 @@ class player:base_player
|
||||||
PREDICTED_INT(dml_state);
|
PREDICTED_INT(dml_state);
|
||||||
|
|
||||||
#ifdef CLIENT
|
#ifdef CLIENT
|
||||||
/* External model */
|
|
||||||
entity p_model;
|
|
||||||
int p_hand_bone;
|
|
||||||
int p_model_bone;
|
|
||||||
float lastweapon;
|
|
||||||
|
|
||||||
virtual void(void) draw;
|
virtual void(void) draw;
|
||||||
virtual float() predraw;
|
virtual float() predraw;
|
||||||
virtual void(void) postdraw;
|
virtual void(void) postdraw;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -24,6 +24,8 @@ enum
|
||||||
void
|
void
|
||||||
w_aicore_draw(void)
|
w_aicore_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
Weapons_SetModel("models/v_aicore.mdl");
|
Weapons_SetModel("models/v_aicore.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 1\n");
|
Weapons_SetGeomset("geomset 1 1\n");
|
||||||
Weapons_ViewAnimation(AIC_DRAW);
|
Weapons_ViewAnimation(AIC_DRAW);
|
||||||
|
@ -122,7 +124,8 @@ w_aicore_precache(void)
|
||||||
weapon_t w_aicore =
|
weapon_t w_aicore =
|
||||||
{
|
{
|
||||||
.name = "aicore",
|
.name = "aicore",
|
||||||
.id = ITEM_AICORE,
|
.id = ITEM_AICORE,
|
||||||
|
.weight = WEIGHT_AICORE,
|
||||||
.slot = 0,
|
.slot = 0,
|
||||||
.slot_pos = 1,
|
.slot_pos = 1,
|
||||||
.draw = w_aicore_draw,
|
.draw = w_aicore_draw,
|
||||||
|
@ -139,6 +142,7 @@ weapon_t w_aicore =
|
||||||
.pmodel = w_aicore_pmodel,
|
.pmodel = w_aicore_pmodel,
|
||||||
.deathmsg = w_aicore_deathmsg,
|
.deathmsg = w_aicore_deathmsg,
|
||||||
.aimanim = w_aicore_aimanim,
|
.aimanim = w_aicore_aimanim,
|
||||||
|
.type = gunman_wpntype_close,
|
||||||
.hudpic = w_aicore_hudpic
|
.hudpic = w_aicore_hudpic
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -29,6 +29,8 @@ enum
|
||||||
void
|
void
|
||||||
w_beamgun_draw(void)
|
w_beamgun_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
Weapons_SetModel("models/v_beam.mdl");
|
Weapons_SetModel("models/v_beam.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 1\n");
|
Weapons_SetGeomset("geomset 1 1\n");
|
||||||
Weapons_ViewAnimation(BEAMGUN_DRAW);
|
Weapons_ViewAnimation(BEAMGUN_DRAW);
|
||||||
|
@ -255,7 +257,8 @@ w_beamgun_precache(void)
|
||||||
weapon_t w_beamgun =
|
weapon_t w_beamgun =
|
||||||
{
|
{
|
||||||
.name = "beamgun",
|
.name = "beamgun",
|
||||||
.id = ITEM_BEAMGUN,
|
.id = ITEM_BEAMGUN,
|
||||||
|
.weight = WEIGHT_BEAMGUN,
|
||||||
.slot = 3,
|
.slot = 3,
|
||||||
.slot_pos = 0,
|
.slot_pos = 0,
|
||||||
.draw = w_beamgun_draw,
|
.draw = w_beamgun_draw,
|
||||||
|
@ -272,6 +275,7 @@ weapon_t w_beamgun =
|
||||||
.pmodel = w_beamgun_pmodel,
|
.pmodel = w_beamgun_pmodel,
|
||||||
.deathmsg = w_beamgun_deathmsg,
|
.deathmsg = w_beamgun_deathmsg,
|
||||||
.aimanim = w_beamgun_aimanim,
|
.aimanim = w_beamgun_aimanim,
|
||||||
|
.type = gunman_wpntype_ranged,
|
||||||
.hudpic = w_beamgun_hudpic
|
.hudpic = w_beamgun_hudpic
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -27,6 +27,8 @@ enum
|
||||||
void
|
void
|
||||||
w_chemicalgun_draw(void)
|
w_chemicalgun_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
Weapons_SetModel("models/v_chemgun.mdl");
|
Weapons_SetModel("models/v_chemgun.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 1\n");
|
Weapons_SetGeomset("geomset 1 1\n");
|
||||||
Weapons_ViewAnimation(CHEMGUN_DRAW);
|
Weapons_ViewAnimation(CHEMGUN_DRAW);
|
||||||
|
@ -357,7 +359,8 @@ w_chemicalgun_precache(void)
|
||||||
weapon_t w_chemicalgun =
|
weapon_t w_chemicalgun =
|
||||||
{
|
{
|
||||||
.name = "chemicalgun",
|
.name = "chemicalgun",
|
||||||
.id = ITEM_CHEMICALGUN,
|
.id = ITEM_CHEMICALGUN,
|
||||||
|
.weight = WEIGHT_CHEMICALGUN,
|
||||||
.slot = 4,
|
.slot = 4,
|
||||||
.slot_pos = 1,
|
.slot_pos = 1,
|
||||||
.draw = w_chemicalgun_draw,
|
.draw = w_chemicalgun_draw,
|
||||||
|
@ -374,6 +377,7 @@ weapon_t w_chemicalgun =
|
||||||
.pmodel = w_chemicalgun_pmodel,
|
.pmodel = w_chemicalgun_pmodel,
|
||||||
.deathmsg = w_chemicalgun_deathmsg,
|
.deathmsg = w_chemicalgun_deathmsg,
|
||||||
.aimanim = w_chemicalgun_aimanim,
|
.aimanim = w_chemicalgun_aimanim,
|
||||||
|
.type = gunman_wpntype_ranged,
|
||||||
.hudpic = w_chemicalgun_hudpic
|
.hudpic = w_chemicalgun_hudpic
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -75,6 +75,8 @@ enum
|
||||||
void
|
void
|
||||||
w_dml_draw(void)
|
w_dml_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
Weapons_SetModel("models/v_dml.mdl");
|
Weapons_SetModel("models/v_dml.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 1\n");
|
Weapons_SetGeomset("geomset 1 1\n");
|
||||||
Weapons_ViewAnimation(DML_DRAW);
|
Weapons_ViewAnimation(DML_DRAW);
|
||||||
|
@ -304,10 +306,10 @@ w_dml_hud(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
txt1 = sprintf("LAUNCH: %s", lmodes[getstati(42)]);
|
txt1 = sprintf("LAUNCH: %s", lmodes[pl.dml_launch]);
|
||||||
txt2 = sprintf("FLIGHTPATH: %s", fmodes[getstati(43)]);
|
txt2 = sprintf("FLIGHTPATH: %s", fmodes[pl.dml_flightpath]);
|
||||||
txt3 = sprintf("DETONATE: %s", dmodes[getstati(44)]);
|
txt3 = sprintf("DETONATE: %s", dmodes[pl.dml_detonate]);
|
||||||
txt4 = sprintf("PAYLOAD: %s", pmodes[getstati(45)]);
|
txt4 = sprintf("PAYLOAD: %s", pmodes[pl.dml_payload]);
|
||||||
pos = g_hudmins + (g_hudres / 2) + [-80,-48];
|
pos = g_hudmins + (g_hudres / 2) + [-80,-48];
|
||||||
|
|
||||||
drawfont = Font_GetID(FONT_20);
|
drawfont = Font_GetID(FONT_20);
|
||||||
|
@ -377,7 +379,8 @@ w_dml_precache(void)
|
||||||
weapon_t w_dml =
|
weapon_t w_dml =
|
||||||
{
|
{
|
||||||
.name = "dml",
|
.name = "dml",
|
||||||
.id = ITEM_DML,
|
.id = ITEM_DML,
|
||||||
|
.weight = WEIGHT_DML,
|
||||||
.slot = 3,
|
.slot = 3,
|
||||||
.slot_pos = 1,
|
.slot_pos = 1,
|
||||||
.draw = w_dml_draw,
|
.draw = w_dml_draw,
|
||||||
|
@ -394,6 +397,7 @@ weapon_t w_dml =
|
||||||
.pmodel = w_dml_pmodel,
|
.pmodel = w_dml_pmodel,
|
||||||
.deathmsg = w_dml_deathmsg,
|
.deathmsg = w_dml_deathmsg,
|
||||||
.aimanim = w_dml_aimanim,
|
.aimanim = w_dml_aimanim,
|
||||||
|
.type = gunman_wpntype_ranged,
|
||||||
.hudpic = w_dml_hudpic
|
.hudpic = w_dml_hudpic
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -52,6 +52,8 @@ w_fists_updateammo(player pl)
|
||||||
void
|
void
|
||||||
w_fists_draw(void)
|
w_fists_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
player pl = (player)self;
|
player pl = (player)self;
|
||||||
Weapons_SetModel("models/v_hands.mdl");
|
Weapons_SetModel("models/v_hands.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 2\n");
|
Weapons_SetGeomset("geomset 1 2\n");
|
||||||
|
@ -153,7 +155,7 @@ w_fists_primary(void)
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
traceline(Weapons_GetCameraPos(), Weapons_GetCameraPos() + (v_forward * 96),\
|
traceline(Weapons_GetCameraPos(), Weapons_GetCameraPos() + (v_forward * 96),\
|
||||||
FALSE, pl);
|
FALSE, pl);
|
||||||
if (trace_fraction <= 1.0) {
|
if (trace_ent && trace_fraction <= 1.0) {
|
||||||
if (trace_ent.takedamage = DAMAGE_YES) {
|
if (trace_ent.takedamage = DAMAGE_YES) {
|
||||||
Damage_Apply(trace_ent, pl, Skill_GetValue("sk_knife1_d", 25), WEAPON_GAUSSPISTOL, DMG_GENERIC);
|
Damage_Apply(trace_ent, pl, Skill_GetValue("sk_knife1_d", 25), WEAPON_GAUSSPISTOL, DMG_GENERIC);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +180,7 @@ w_fists_primary(void)
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
traceline(Weapons_GetCameraPos(), Weapons_GetCameraPos() + (v_forward * 96),\
|
traceline(Weapons_GetCameraPos(), Weapons_GetCameraPos() + (v_forward * 96),\
|
||||||
FALSE, pl);
|
FALSE, pl);
|
||||||
if (trace_fraction <= 1.0) {
|
if (trace_ent && trace_fraction <= 1.0) {
|
||||||
if (trace_ent.takedamage = DAMAGE_YES) {
|
if (trace_ent.takedamage = DAMAGE_YES) {
|
||||||
Damage_Apply(trace_ent, pl, Skill_GetValue("sk_twohandpunch_d", 10), WEAPON_GAUSSPISTOL, DMG_GENERIC);
|
Damage_Apply(trace_ent, pl, Skill_GetValue("sk_twohandpunch_d", 10), WEAPON_GAUSSPISTOL, DMG_GENERIC);
|
||||||
}
|
}
|
||||||
|
@ -288,7 +290,8 @@ w_fists_precache(void)
|
||||||
weapon_t w_fists =
|
weapon_t w_fists =
|
||||||
{
|
{
|
||||||
.name = "fists",
|
.name = "fists",
|
||||||
.id = ITEM_FISTS,
|
.id = ITEM_FISTS,
|
||||||
|
.weight = WEIGHT_FISTS,
|
||||||
.slot = 0,
|
.slot = 0,
|
||||||
.slot_pos = 0,
|
.slot_pos = 0,
|
||||||
.draw = w_fists_draw,
|
.draw = w_fists_draw,
|
||||||
|
@ -305,5 +308,6 @@ weapon_t w_fists =
|
||||||
.pmodel = __NULL__,
|
.pmodel = __NULL__,
|
||||||
.deathmsg = w_fists_deathmsg,
|
.deathmsg = w_fists_deathmsg,
|
||||||
.aimanim = w_fists_aimanim,
|
.aimanim = w_fists_aimanim,
|
||||||
|
.type = gunman_wpntype_close,
|
||||||
.hudpic = w_fists_hudpic
|
.hudpic = w_fists_hudpic
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -42,6 +42,8 @@ enum
|
||||||
void
|
void
|
||||||
w_gausspistol_draw(void)
|
w_gausspistol_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
Weapons_SetModel("models/v_guasspistol.mdl");
|
Weapons_SetModel("models/v_guasspistol.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 1\n");
|
Weapons_SetGeomset("geomset 1 1\n");
|
||||||
Weapons_ViewAnimation(GP_DRAW);
|
Weapons_ViewAnimation(GP_DRAW);
|
||||||
|
@ -122,13 +124,20 @@ w_gausspistol_primary(void)
|
||||||
vector src;
|
vector src;
|
||||||
int take = 1;
|
int take = 1;
|
||||||
player pl = (player)self;
|
player pl = (player)self;
|
||||||
|
|
||||||
|
if (pl.menu_active > 0) {
|
||||||
|
pl.menu_active = 0;
|
||||||
|
pl.gflags |= GF_SEMI_TOGGLED;
|
||||||
|
pl.w_attack_next = 0.25f;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (pl.gflags & GF_SEMI_TOGGLED) {
|
if (pl.gflags & GF_SEMI_TOGGLED) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl.a_ammo1 > 0) {
|
if (pl.menu_active > 0) {
|
||||||
pl.a_ammo1 = 0;
|
pl.menu_active = 0;
|
||||||
pl.gflags |= GF_SEMI_TOGGLED;
|
pl.gflags |= GF_SEMI_TOGGLED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -210,7 +219,7 @@ w_gausspistol_secondary(void)
|
||||||
pl.gflags |= GF_SEMI_TOGGLED;
|
pl.gflags |= GF_SEMI_TOGGLED;
|
||||||
|
|
||||||
/* activate menu */
|
/* activate menu */
|
||||||
pl.a_ammo1 = 1;
|
pl.menu_active = 1;
|
||||||
w_gausspistol_release();
|
w_gausspistol_release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,7 +291,7 @@ w_gausspistol_hud(void)
|
||||||
HUD_DrawAmmo2();
|
HUD_DrawAmmo2();
|
||||||
|
|
||||||
/* menu */
|
/* menu */
|
||||||
if (pl.a_ammo1 > 0) {
|
if (pl.menu_active > 0) {
|
||||||
pos = g_hudmins + (g_hudres / 2) + [-96,-72];
|
pos = g_hudmins + (g_hudres / 2) + [-96,-72];
|
||||||
|
|
||||||
/* far left */
|
/* far left */
|
||||||
|
@ -415,6 +424,7 @@ weapon_t w_gausspistol =
|
||||||
{
|
{
|
||||||
.name = "gausspistol",
|
.name = "gausspistol",
|
||||||
.id = ITEM_GAUSSPISTOL,
|
.id = ITEM_GAUSSPISTOL,
|
||||||
|
.weight = WEIGHT_GAUSSPISTOL,
|
||||||
.slot = 1,
|
.slot = 1,
|
||||||
.slot_pos = 0,
|
.slot_pos = 0,
|
||||||
.draw = w_gausspistol_draw,
|
.draw = w_gausspistol_draw,
|
||||||
|
@ -431,6 +441,7 @@ weapon_t w_gausspistol =
|
||||||
.pmodel = w_gausspistol_pmodel,
|
.pmodel = w_gausspistol_pmodel,
|
||||||
.deathmsg = w_gausspistol_deathmsg,
|
.deathmsg = w_gausspistol_deathmsg,
|
||||||
.aimanim = w_gausspistol_aimanim,
|
.aimanim = w_gausspistol_aimanim,
|
||||||
|
.type = gunman_wpntype_ranged,
|
||||||
.hudpic = w_gausspistol_hudpic
|
.hudpic = w_gausspistol_hudpic
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -447,7 +458,7 @@ weapon_gausspistol(void)
|
||||||
int
|
int
|
||||||
w_gausspistol_hudforward(player pl)
|
w_gausspistol_hudforward(player pl)
|
||||||
{
|
{
|
||||||
if (pl.a_ammo1 <= 0) {
|
if (pl.menu_active <= 0) {
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,7 +470,7 @@ w_gausspistol_hudforward(player pl)
|
||||||
int
|
int
|
||||||
w_gausspistol_hudback(player pl)
|
w_gausspistol_hudback(player pl)
|
||||||
{
|
{
|
||||||
if (pl.a_ammo1 <= 0) {
|
if (pl.menu_active <= 0) {
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -29,6 +29,8 @@ enum
|
||||||
void
|
void
|
||||||
w_grenade_draw(void)
|
w_grenade_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
Weapons_SetModel("models/v_grenade.mdl");
|
Weapons_SetModel("models/v_grenade.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 1\n");
|
Weapons_SetGeomset("geomset 1 1\n");
|
||||||
Weapons_ViewAnimation(GREN_DRAW);
|
Weapons_ViewAnimation(GREN_DRAW);
|
||||||
|
@ -219,7 +221,8 @@ w_grenade_precache(void)
|
||||||
weapon_t w_grenade =
|
weapon_t w_grenade =
|
||||||
{
|
{
|
||||||
.name = "grenade",
|
.name = "grenade",
|
||||||
.id = ITEM_GRENADE,
|
.id = ITEM_GRENADE,
|
||||||
|
.weight = WEIGHT_GRENADE,
|
||||||
.slot = 4,
|
.slot = 4,
|
||||||
.slot_pos = 0,
|
.slot_pos = 0,
|
||||||
.draw = w_grenade_draw,
|
.draw = w_grenade_draw,
|
||||||
|
@ -236,6 +239,7 @@ weapon_t w_grenade =
|
||||||
.pmodel = w_grenade_pmodel,
|
.pmodel = w_grenade_pmodel,
|
||||||
.deathmsg = w_grenade_deathmsg,
|
.deathmsg = w_grenade_deathmsg,
|
||||||
.aimanim = w_grenade_aimanim,
|
.aimanim = w_grenade_aimanim,
|
||||||
|
.type = gunman_wpntype_throw,
|
||||||
.hudpic = w_grenade_hudpic
|
.hudpic = w_grenade_hudpic
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -30,6 +30,8 @@ enum
|
||||||
void
|
void
|
||||||
w_minigun_draw(void)
|
w_minigun_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
Weapons_SetModel("models/v_mechagun.mdl");
|
Weapons_SetModel("models/v_mechagun.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 1\n");
|
Weapons_SetGeomset("geomset 1 1\n");
|
||||||
Weapons_ViewAnimation(MG_DRAW);
|
Weapons_ViewAnimation(MG_DRAW);
|
||||||
|
@ -268,6 +270,7 @@ weapon_t w_minigun =
|
||||||
.pmodel = w_minigun_pmodel,
|
.pmodel = w_minigun_pmodel,
|
||||||
.deathmsg = w_minigun_deathmsg,
|
.deathmsg = w_minigun_deathmsg,
|
||||||
.aimanim = w_minigun_aimanim,
|
.aimanim = w_minigun_aimanim,
|
||||||
|
.type = gunman_wpntype_ranged,
|
||||||
.hudpic = w_minigun_hudpic
|
.hudpic = w_minigun_hudpic
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -51,6 +51,8 @@ string gsmodes[] = {
|
||||||
void
|
void
|
||||||
w_shotgun_draw(void)
|
w_shotgun_draw(void)
|
||||||
{
|
{
|
||||||
|
player pl = (player)self;
|
||||||
|
pl.menu_active = 0;
|
||||||
Weapons_SetModel("models/v_shotgun.mdl");
|
Weapons_SetModel("models/v_shotgun.mdl");
|
||||||
Weapons_SetGeomset("geomset 1 1\n");
|
Weapons_SetGeomset("geomset 1 1\n");
|
||||||
Weapons_ViewAnimation(SHOTGUN_DRAW);
|
Weapons_ViewAnimation(SHOTGUN_DRAW);
|
||||||
|
@ -271,8 +273,8 @@ w_shotgun_hud(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
shellstr = sprintf("SHELLS: %i", getstati(40));
|
shellstr = sprintf("SHELLS: %i", pl.shotgun_shells);
|
||||||
spreadstr = sprintf("SPREAD: %s", gsmodes[getstati(41)]);
|
spreadstr = sprintf("SPREAD: %s", gsmodes[pl.shotgun_spread]);
|
||||||
pos = g_hudmins + (g_hudres / 2) + [-48,-16];
|
pos = g_hudmins + (g_hudres / 2) + [-48,-16];
|
||||||
|
|
||||||
drawfont = Font_GetID(FONT_20);
|
drawfont = Font_GetID(FONT_20);
|
||||||
|
@ -345,6 +347,7 @@ weapon_t w_shotgun =
|
||||||
.pmodel = w_shotgun_pmodel,
|
.pmodel = w_shotgun_pmodel,
|
||||||
.deathmsg = w_shotgun_deathmsg,
|
.deathmsg = w_shotgun_deathmsg,
|
||||||
.aimanim = w_shotgun_aimanim,
|
.aimanim = w_shotgun_aimanim,
|
||||||
|
.type = gunman_wpntype_ranged,
|
||||||
.hudpic = w_shotgun_hudpic
|
.hudpic = w_shotgun_hudpic
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
@ -28,3 +28,33 @@ enum
|
||||||
WEAPON_GRENADE,
|
WEAPON_GRENADE,
|
||||||
WEAPON_CHEMICALGUN
|
WEAPON_CHEMICALGUN
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* weight table... I just guessed this was a good compromise */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
WEIGHT_AICORE,
|
||||||
|
WEIGHT_NONE,
|
||||||
|
WEIGHT_FISTS,
|
||||||
|
WEIGHT_GRENADE,
|
||||||
|
WEIGHT_GAUSSPISTOL,
|
||||||
|
WEIGHT_DML,
|
||||||
|
WEIGHT_SHOTGUN,
|
||||||
|
WEIGHT_MINIGUN,
|
||||||
|
WEIGHT_BEAMGUN,
|
||||||
|
WEIGHT_CHEMICALGUN
|
||||||
|
};
|
||||||
|
|
||||||
|
weapontype_t gunman_wpntype_ranged(void)
|
||||||
|
{
|
||||||
|
return WPNTYPE_RANGED;
|
||||||
|
}
|
||||||
|
|
||||||
|
weapontype_t gunman_wpntype_close(void)
|
||||||
|
{
|
||||||
|
return WPNTYPE_CLOSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
weapontype_t gunman_wpntype_throw(void)
|
||||||
|
{
|
||||||
|
return WPNTYPE_THROW;
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
|
Loading…
Reference in a new issue