Compare commits
No commits in common. "master" and "Develop" have entirely different histories.
44 changed files with 852 additions and 713 deletions
|
@ -1,13 +1,4 @@
|
|||
entityDef ammo_base
|
||||
{
|
||||
"spawnclass" "ncItem"
|
||||
"snd_acquire" "ammo.pickup"
|
||||
"snd_respawn" "ammo.respawn"
|
||||
"mins" "-12 -12 0"
|
||||
"maxs" "12 12 12"
|
||||
"droptofloor" "1"
|
||||
}
|
||||
|
||||
#include "ammo/base.def"
|
||||
#include "ammo/buckshot.def"
|
||||
#include "ammo/357.def"
|
||||
#include "ammo/9mmAR.def"
|
||||
|
@ -33,7 +24,6 @@ entityDef ammo_types {
|
|||
"ammo_snark" "10"
|
||||
"ammo_hornet" "11"
|
||||
"ammo_m203_grenade" "12"
|
||||
"ammo_chumtoad" "13"
|
||||
}
|
||||
|
||||
entityDef ammo_names {
|
||||
|
@ -50,7 +40,6 @@ entityDef ammo_names {
|
|||
"ammo_snark" "Squeak Grenades"
|
||||
"ammo_hornet" "Hornets"
|
||||
"ammo_m203_grenade" "M203 Grenades"
|
||||
"ammo_chumtoad" "Chumtoads"
|
||||
}
|
||||
|
||||
entityDef ammo_max {
|
||||
|
@ -67,5 +56,4 @@ entityDef ammo_max {
|
|||
"ammo_snark" "10"
|
||||
"ammo_hornet" "8"
|
||||
"ammo_m203_grenade" "10"
|
||||
"ammo_chumtoad" "10"
|
||||
}
|
||||
|
|
9
decls/def/ammo/base.def
Normal file
9
decls/def/ammo/base.def
Normal file
|
@ -0,0 +1,9 @@
|
|||
entityDef ammo_base
|
||||
{
|
||||
"spawnclass" "ncItem"
|
||||
"snd_acquire" "ammo.pickup"
|
||||
"snd_respawn" "ammo.respawn"
|
||||
"mins" "-12 -12 0"
|
||||
"maxs" "12 12 12"
|
||||
"droptofloor" "1"
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
entityDef debris_brass
|
||||
{
|
||||
"spawnclass" "ncDebris"
|
||||
"mins" "-1 -1 -1"
|
||||
"maxs" "1 1 1"
|
||||
"model" "models/shell.mdl"
|
||||
"velocity" "0 80 40"
|
||||
"gravity" "0.5"
|
||||
"mass" "0.5"
|
||||
}
|
||||
|
||||
entityDef debris_brass_fast
|
||||
{
|
||||
"spawnclass" "ncDebris"
|
||||
"mins" "-1 -1 -1"
|
||||
"maxs" "1 1 1"
|
||||
"model" "models/shell.mdl"
|
||||
"velocity" "0 160 40"
|
||||
"gravity" "0.5"
|
||||
"mass" "0.5"
|
||||
}
|
||||
|
||||
entityDef debris_brass_high
|
||||
{
|
||||
"spawnclass" "ncDebris"
|
||||
"mins" "-1 -1 -1"
|
||||
"maxs" "1 1 1"
|
||||
"model" "models/shell.mdl"
|
||||
"velocity" "0 160 120"
|
||||
"gravity" "0.5"
|
||||
"mass" "0.5"
|
||||
}
|
||||
|
||||
entityDef debris_shell
|
||||
{
|
||||
"spawnclass" "ncDebris"
|
||||
"mins" "-1 -1 -1"
|
||||
"maxs" "1 1 1"
|
||||
"model" "models/shotgunshell.mdl"
|
||||
"velocity" "0 160 40"
|
||||
"gravity" "0.5"
|
||||
"mass" "0.5"
|
||||
}
|
|
@ -9,98 +9,6 @@ entityDef player
|
|||
"armorBonus" "0.5"
|
||||
"model" "models/player.mdl"
|
||||
|
||||
"spine" "Bip01 Spine"
|
||||
"torsoStart" "Bip01 Spine"
|
||||
"torsoEnd" "Bip01 R Finger12"
|
||||
|
||||
"act_idle" "0"
|
||||
"act_jump" "8"
|
||||
"act_walk_crouch" "6"
|
||||
"act_idle_crouch" "7"
|
||||
"act_run" "12"
|
||||
"act_walk" "13"
|
||||
|
||||
"act_draw" "16,14"
|
||||
"act_aim" "16,14"
|
||||
"act_attack" "17,15"
|
||||
|
||||
"act_draw_crowbar" "25"
|
||||
"act_aim_crowbar" "25"
|
||||
"act_attack_crowbar" "26"
|
||||
"act_aim_crouch_crowbar" "27"
|
||||
"act_attack_crouch_crowbar" "28"
|
||||
|
||||
"act_draw_tripmine" "29"
|
||||
"act_aim_tripmine" "29"
|
||||
"act_attack_tripmine" "30"
|
||||
"act_aim_crouch_tripmine" "31"
|
||||
"act_attack_crouch_tripmine" "32"
|
||||
|
||||
"act_draw_onehand" "33"
|
||||
"act_aim_onehand" "33"
|
||||
"act_attack_onehand" "34"
|
||||
"act_aim_crouch_onehand" "35"
|
||||
"act_attack_crouch_onehand" "36"
|
||||
|
||||
"act_draw_python" "37"
|
||||
"act_aim_python" "37"
|
||||
"act_attack_python" "38"
|
||||
"act_aim_crouch_python" "39"
|
||||
"act_attack_crouch_python" "40"
|
||||
|
||||
"act_draw_shotgun" "41"
|
||||
"act_aim_shotgun" "41"
|
||||
"act_attack_shotgun" "42"
|
||||
"act_aim_crouch_shotgun" "43"
|
||||
"act_attack_crouch_shotgun" "44"
|
||||
|
||||
"act_draw_gauss" "45"
|
||||
"act_aim_gauss" "45"
|
||||
"act_attack_gauss" "46"
|
||||
"act_aim_crouch_gauss" "47"
|
||||
"act_attack_crouch_gauss" "48"
|
||||
|
||||
"act_draw_mp5" "49"
|
||||
"act_aim_mp5" "49"
|
||||
"act_attack_mp5" "50"
|
||||
"act_aim_crouch_mp5" "51"
|
||||
"act_attack_crouch_mp5" "52"
|
||||
|
||||
|
||||
"act_draw_rpg" "53"
|
||||
"act_aim_rpg" "53"
|
||||
"act_attack_rpg" "54"
|
||||
"act_aim_crouch_rpg" "55"
|
||||
"act_attack_crouch_rpg" "56"
|
||||
|
||||
|
||||
"act_draw_egon" "57"
|
||||
"act_aim_egon" "57"
|
||||
"act_attack_egon" "58"
|
||||
"act_aim_crouch_egon" "59"
|
||||
"act_attack_crouch_egon" "60"
|
||||
|
||||
|
||||
"act_draw_squeak" "61"
|
||||
"act_aim_squeak" "61"
|
||||
"act_attack_squeak" "62"
|
||||
"act_aim_crouch_squeak" "63"
|
||||
"act_attack_crouch_squeak" "64"
|
||||
|
||||
|
||||
"act_draw_hive" "65"
|
||||
"act_aim_hive" "65"
|
||||
"act_attack_hive" "66"
|
||||
"act_aim_crouch_hive" "67"
|
||||
"act_attack_crouch_hive" "68"
|
||||
|
||||
|
||||
"act_draw_crossbow" "69"
|
||||
"act_aim_crossbow" "69"
|
||||
"act_attack_crossbow" "70"
|
||||
"act_aim_crouch_crossbow" "71"
|
||||
"act_attack_crouch_crossbow" "71"
|
||||
|
||||
"snd_stepladderLeft" "step_ladder.left"
|
||||
"snd_stepladderRight" "step_ladder.right"
|
||||
"snd_fall" "Player.FallDamage"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
entityDef weapon_base
|
||||
{
|
||||
"spawnclass" "hlWeapon"
|
||||
"spawnclass" "HLWeapon"
|
||||
"mins" "-16 -16 0"
|
||||
"maxs" "16 16 16"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
|
@ -10,7 +10,6 @@ entityDef weapon_base
|
|||
#include "weapons/357.def"
|
||||
#include "weapons/9mmAR.def"
|
||||
#include "weapons/9mmhandgun.def"
|
||||
#include "weapons/chumtoad.def"
|
||||
#include "weapons/crossbow.def"
|
||||
#include "weapons/crowbar.def"
|
||||
#include "weapons/egon.def"
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
#define 357_IDLE1 0
|
||||
#define 357_FIDGET 1
|
||||
#define 357_FIRE 2
|
||||
#define 357_RELOAD 3
|
||||
#define 357_HOLSTER 4
|
||||
#define 357_DRAW 5
|
||||
#define 357_IDLE2 6
|
||||
#define 357_IDLE3 7
|
||||
|
||||
entityDef weapon_357
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -15,16 +6,16 @@ entityDef weapon_357
|
|||
"editor_usage" ".357 Revolver"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_357.mdl"
|
||||
"model_player" "models/p_357.mdl"
|
||||
"model_view" "models/v_357.mdl"
|
||||
"animPrefix" "python"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
// weapon specific
|
||||
"def_fireInfo" "fireInfo_357"
|
||||
"inv_name" ".357 Revolver"
|
||||
"clipSize" "6"
|
||||
"def_fireInfo" "fireInfo_357"
|
||||
"inv_name" ".357 Revolver"
|
||||
"clipSize" "6"
|
||||
|
||||
"ammoIcon" "weapon_357.ammo"
|
||||
"ammo2Icon" "weapon_357.ammo2"
|
||||
|
@ -32,21 +23,21 @@ entityDef weapon_357
|
|||
"icon" "weapon_357.weapon"
|
||||
"iconSelected" "weapon_357.weapon_s"
|
||||
|
||||
"act_fire" "$357_FIRE"
|
||||
"act_holster" "$357_HOLSTER"
|
||||
"act_reload" "$357_RELOAD"
|
||||
"act_draw" "$357_DRAW"
|
||||
"act_idle" "$357_IDLE1,$357_FIDGET,$357_IDLE2,$357_IDLE3"
|
||||
"act_fire" "2"
|
||||
"act_holster" "4"
|
||||
"act_reload" "3"
|
||||
"act_draw" "5"
|
||||
"act_idle" "0,1,6,7"
|
||||
|
||||
"snd_fire" "Weapon_357.Single"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
"snd_reload" "Weapon_357.Reload"
|
||||
"snd_fire" "Weapon_357.Single"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
"snd_reload" "Weapon_357.Reload"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "1"
|
||||
"hudSlotPos" "1"
|
||||
"weight" "15"
|
||||
"killIcon" "d_357"
|
||||
"hudSlot" "1"
|
||||
"hudSlotPos" "1"
|
||||
"weight" "15"
|
||||
"killIcon" "d_357"
|
||||
}
|
||||
|
||||
entityDef weapon_python
|
||||
|
@ -74,7 +65,7 @@ entityDef fireInfo_357
|
|||
// multiplayer variant
|
||||
entityDef weapon_357_mp
|
||||
{
|
||||
"inherit" "weapon_357"
|
||||
"view_geomset" "geomset 4 2\n"
|
||||
"zoomFov" "45"
|
||||
"inherit" "weapon_357"
|
||||
"view_geomset" "geomset 4 2\n"
|
||||
"zoomFov" "45"
|
||||
}
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
#define 9MMAR_IDLE1 0
|
||||
#define 9MMAR_IDLE2 1
|
||||
#define 9MMAR_SECONDARY 2
|
||||
#define 9MMAR_RELOAD 3
|
||||
#define 9MMAR_DRAW 4
|
||||
#define 9MMAR_FIRE1 5
|
||||
#define 9MMAR_FIRE2 6
|
||||
#define 9MMAR_FIRE3 7
|
||||
|
||||
entityDef weapon_9mmAR
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -15,11 +6,11 @@ entityDef weapon_9mmAR
|
|||
"editor_usage" "9mm AR"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_9mmAR.mdl"
|
||||
"model_player" "models/p_9mmAR.mdl"
|
||||
"model_view" "models/v_9mmAR.mdl"
|
||||
"animPrefix" "mp5"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
// ncWeapon specific
|
||||
"def_fireInfo" "fireInfo_9mmAR"
|
||||
|
@ -28,29 +19,25 @@ entityDef weapon_9mmAR
|
|||
"clipSize" "50"
|
||||
"clipSizeDefault" "25"
|
||||
|
||||
"def_ejectBrass" "debris_brass_fast"
|
||||
"ejectBrassDelay" "0"
|
||||
"ejectBrassOffset" "17 6 -8"
|
||||
|
||||
"ammoIcon" "weapon_9mmar.ammo"
|
||||
"ammo2Icon" "weapon_9mmar.ammo2"
|
||||
"crosshair" "weapon_9mmar.crosshair"
|
||||
"icon" "weapon_9mmar.weapon"
|
||||
"iconSelected" "weapon_9mmar.weapon_s"
|
||||
|
||||
"act_fire" "$9MMAR_FIRE1,$9MMAR_FIRE2,$9MMAR_FIRE3"
|
||||
// "act_holster" "$9MMAR_HOLSTER"
|
||||
"act_reload" "$9MMAR_RELOAD"
|
||||
"act_draw" "$9MMAR_DRAW"
|
||||
"act_idle" "$9MMAR_IDLE1,$9MMAR_IDLE2"
|
||||
"act_fire" "5,6,7"
|
||||
"act_holster" "4"
|
||||
"act_reload" "3"
|
||||
"act_draw" "4"
|
||||
"act_idle" "0,1"
|
||||
|
||||
"snd_fire" "Weapon_MP5.Single"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
"snd_fire" "Weapon_MP5.Single"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "2"
|
||||
"hudSlotPos" "0"
|
||||
"weight" "15"
|
||||
"hudSlot" "2"
|
||||
"hudSlotPos" "0"
|
||||
"weight" "15"
|
||||
}
|
||||
|
||||
entityDef projectile_9mmAR
|
||||
|
@ -73,14 +60,14 @@ entityDef fireInfo_9mmAR
|
|||
|
||||
entityDef fireInfo_ARGrenade
|
||||
{
|
||||
"def_onFire" "projectile_ARgrenade"
|
||||
"def_onFire" "projectile_ARgrenade"
|
||||
"ammoType" "ammo_m203_grenade"
|
||||
"ammoRequired" "1"
|
||||
"ammoPerShot" "1"
|
||||
"fireRate" "1"
|
||||
"punchAngle" "-10 0 0"
|
||||
"snd_fire" "Weapon_MP5.Double"
|
||||
"act_fire" "$9MMAR_SECONDARY"
|
||||
"act_fire" "2"
|
||||
}
|
||||
|
||||
entityDef projectile_ARgrenade
|
||||
|
@ -105,7 +92,6 @@ entityDef projectile_ARgrenade
|
|||
|
||||
"def_damage" "damage_ARgrenadeDirect"
|
||||
"def_splash_damage" "damage_ARgrenadeSplash"
|
||||
|
||||
"detonate_offset" "24"
|
||||
"explode_light_color" "1 0.5 0"
|
||||
"explode_light_radius" "1024"
|
||||
|
@ -121,8 +107,7 @@ entityDef damage_ARgrenadeSplash
|
|||
{
|
||||
"damage" "skill:plr_9mmAR_grenade"
|
||||
"radius" "160"
|
||||
"knockback" "300"
|
||||
"push" "10000"
|
||||
"knockback" "300"
|
||||
}
|
||||
|
||||
// multiplayer version
|
||||
|
|
|
@ -16,11 +16,11 @@ entityDef weapon_9mmhandgun
|
|||
"editor_usage" "9mm Handgun"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_9mmhandgun.mdl"
|
||||
"model_player" "models/p_9mmhandgun.mdl"
|
||||
"model_view" "models/v_9mmhandgun.mdl"
|
||||
"animPrefix" "onehand"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
// weapon specific
|
||||
"def_fireInfo" "fireInfo_glock"
|
||||
|
@ -32,10 +32,6 @@ entityDef weapon_9mmhandgun
|
|||
"ammoPerShot" "1"
|
||||
"punchAngle" "-2 0 0"
|
||||
|
||||
"def_ejectBrass" "debris_brass"
|
||||
"ejectBrassDelay" "10"
|
||||
"ejectBrassOffset" "18 6 -6"
|
||||
|
||||
"act_fire" "$9MMHANDGUN_FIRE"
|
||||
"act_fireLast" "$9MMHANDGUN_FIRELAST"
|
||||
"act_holster" "$9MMHANDGUN_HOLSTER"
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
#define CHUMTOAD_IDLE 0
|
||||
#define CHUMTOAD_FIDGET1 1
|
||||
#define CHUMTOAD_FIDGET2 2
|
||||
#define CHUMTOAD_HOLSTER 3
|
||||
#define CHUMTOAD_DRAW 4
|
||||
#define CHUMTOAD_FIRE 5
|
||||
|
||||
entityDef weapon_chumtoad
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
"editor_mins" "-16 -16 -16"
|
||||
"editor_maxs" "16 16 16"
|
||||
"editor_usage" "Chumtoad"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"model" "models/chumtoad.mdl"
|
||||
"model_player" "models/p_squeak.mdl"
|
||||
"model_view" "models/v_chub.mdl"
|
||||
"frame" "1"
|
||||
"animPrefix" "squeak"
|
||||
|
||||
"inv_name" "Chumtoad"
|
||||
"inv_weapon" "weapon_chumtoad"
|
||||
"inv_ammo_chumtoad" "5"
|
||||
"def_onFire" "projectile_chumtoad"
|
||||
"ammoType" "ammo_chumtoad"
|
||||
"ammoRequired" "1"
|
||||
"silent_fire" "1"
|
||||
"primed_fuse" "4"
|
||||
|
||||
"act_idle" "$CHUMTOAD_IDLE,$CHUMTOAD_FIDGET1,$CHUMTOAD_FIDGET2"
|
||||
"act_draw" "$CHUMTOAD_DRAW"
|
||||
"act_holster" "$CHUMTOAD_HOLSTER"
|
||||
"act_fire" "$CHUMTOAD_FIRE"
|
||||
"removeOnEmpty" "1"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "4"
|
||||
"hudSlotPos" "4"
|
||||
"weight" "5"
|
||||
"crosshair" "none"
|
||||
}
|
||||
|
||||
entityDef projectile_chumtoad
|
||||
{
|
||||
"spawnclass" "ncAttack"
|
||||
"def_drop" "monster_chumtoad"
|
||||
"dropDistance" "24"
|
||||
"dropOffset" "8"
|
||||
"drop" "1"
|
||||
}
|
|
@ -1,16 +1,3 @@
|
|||
#define CROSSBOW_IDLE 0
|
||||
#define CROSSBOW_IDLE_EMPTY 1
|
||||
#define CROSSBOW_FIDGET 2
|
||||
#define CROSSBOW_FIDGET_EMPTY 3
|
||||
#define CROSSBOW_FIRE1 4
|
||||
#define CROSSBOW_FIRE2 5
|
||||
#define CROSSBOW_FIRE_LAST 6
|
||||
#define CROSSBOW_RELOAD 7
|
||||
#define CROSSBOW_DRAW 8
|
||||
#define CROSSBOW_DRAW_EMPTY 9
|
||||
#define CROSSBOW_HOLSTER 10
|
||||
#define CROSSBOW_HOLSTER_EMPTY 11
|
||||
|
||||
entityDef weapon_crossbow
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -19,16 +6,16 @@ entityDef weapon_crossbow
|
|||
"editor_usage" "Crossbow"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_crossbow.mdl"
|
||||
"model_player" "models/p_crossbow.mdl"
|
||||
"model_view" "models/v_crossbow.mdl"
|
||||
"animPrefix" "crossbow"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
// weapon specific
|
||||
"def_fireInfo" "fireInfo_crossbow"
|
||||
"inv_name" "Crossbow"
|
||||
"clipSize" "5"
|
||||
"def_fireInfo" "fireInfo_crossbow"
|
||||
"inv_name" "Crossbow"
|
||||
"clipSize" "5"
|
||||
|
||||
"ammoIcon" "weapon_crossbow.ammo"
|
||||
"ammo2Icon" "weapon_crossbow.ammo2"
|
||||
|
@ -36,25 +23,25 @@ entityDef weapon_crossbow
|
|||
"icon" "weapon_crossbow.weapon"
|
||||
"iconSelected" "weapon_crossbow.weapon_s"
|
||||
|
||||
"act_fire" "$CROSSBOW_FIRE1,$CROSSBOW_FIRE2"
|
||||
"act_fireLast" "$$CROSSBOW_FIRE_LAST"
|
||||
"act_holster" "$CROSSBOW_HOLSTER"
|
||||
"act_holsterEmpty" "$CROSSBOW_HOLSTER_EMPTY"
|
||||
"act_reload" "$CROSSBOW_RELOAD"
|
||||
"act_draw" "$CROSSBOW_DRAW"
|
||||
"act_drawEmpty" "$CROSSBOW_DRAW_EMPTY"
|
||||
"act_idle" "$CROSSBOW_IDLE,$CROSSBOW_FIDGET"
|
||||
"act_idleEmpty" "$CROSSBOW_IDLE_EMPTY,$CROSSBOW_FIDGET_EMPTY"
|
||||
"act_fire" "4"
|
||||
"act_fireLast" "6"
|
||||
"act_holster" "10"
|
||||
"act_holsterEmpty" "11"
|
||||
"act_reload" "7"
|
||||
"act_draw" "8"
|
||||
"act_drawEmpty" "9"
|
||||
"act_idle" "0,2"
|
||||
"act_idleEmpty" "1,3"
|
||||
|
||||
"snd_fire" "Weapon_Crossbow.Single"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
"snd_reload" "Weapon_Crossbow.Reload"
|
||||
"snd_fire" "Weapon_Crossbow.Single"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
"snd_reload" "Weapon_Crossbow.Reload"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "2"
|
||||
"hudSlotPos" "2"
|
||||
"weight" "10"
|
||||
"zoomFov" "18"
|
||||
"hudSlot" "2"
|
||||
"hudSlotPos" "2"
|
||||
"weight" "10"
|
||||
"zoomFov" "18"
|
||||
}
|
||||
|
||||
entityDef weapon_crossbow_mp
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
#define CROWBAR_IDLE1 0
|
||||
#define CROWBAR_DRAW 1
|
||||
#define CROWBAR_HOLSTER 2
|
||||
#define CROWBAR_FIRE1_HIT 3
|
||||
#define CROWBAR_FIRE1_MISS 4
|
||||
#define CROWBAR_FIRE2_HIT 5
|
||||
#define CROWBAR_FIRE2_MISS 6
|
||||
#define CROWBAR_FIRE3_MISS 7
|
||||
#define CROWBAR_FIRE3_HIT 8
|
||||
#define CROWBAR_IDLE2 9
|
||||
#define CROWBAR_IDLE3 10
|
||||
|
||||
entityDef weapon_crowbar
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -18,11 +6,11 @@ entityDef weapon_crowbar
|
|||
"editor_usage" "Crowbar"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_crowbar.mdl"
|
||||
"model_player" "models/p_crowbar.mdl"
|
||||
"model_view" "models/v_crowbar.mdl"
|
||||
"animPrefix" "crowbar"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
// weapon specific
|
||||
"def_onFire" "projectile_crowbar"
|
||||
|
@ -35,11 +23,11 @@ entityDef weapon_crowbar
|
|||
"fireRate" "0.25"
|
||||
"snd_fireFailed" "Weapon_Crowbar.Single"
|
||||
|
||||
"act_idle" "$CROWBAR_IDLE1,$CROWBAR_IDLE2,$CROWBAR_IDLE3"
|
||||
"act_draw" "$CROWBAR_DRAW"
|
||||
"act_holster" "$CROWBAR_HOLSTER"
|
||||
"act_fireFailed" "$CROWBAR_FIRE1_MISS,$CROWBAR_FIRE2_MISS,$CROWBAR_FIRE3_MISS"
|
||||
"act_fire" "$CROWBAR_FIRE1_HIT,$CROWBAR_FIRE2_HIT,$CROWBAR_FIRE3_HIT"
|
||||
"act_idle" "0"
|
||||
"act_draw" "1"
|
||||
"act_holster" "2"
|
||||
"act_fireFailed" "4,5,7"
|
||||
"act_fire" "3,6,8"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "0"
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
#define EGON_IDLE 0
|
||||
#define EGON_FIDGET 1
|
||||
#define EGON_SECONDARY_MODE_START 2
|
||||
#define EGON_SECONDARY_FIRE 3
|
||||
#define EGON_SECONDARY_MODE_END 4
|
||||
#define EGON_FIRE1 5
|
||||
#define EGON_FIRE2 6
|
||||
#define EGON_FIRE3 7
|
||||
#define EGON_FIRE4 8
|
||||
#define EGON_DRAW 9
|
||||
#define EGON_HOLSTER 10
|
||||
|
||||
entityDef weapon_egon
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -18,21 +6,21 @@ entityDef weapon_egon
|
|||
"editor_usage" "Gluon Gun"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_egon.mdl"
|
||||
"model_player" "models/p_egon.mdl"
|
||||
"model_view" "models/v_egon.mdl"
|
||||
"animPrefix" "egon"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
"def_onFire" "projectile_egonbeam"
|
||||
|
||||
"inv_ammo_uranium" "20"
|
||||
"ammoType" "ammo_uranium"
|
||||
"ammoRequired" "1"
|
||||
"act_idle" "$EGON_IDLE,$EGON_FIDGET"
|
||||
"act_draw" "$EGON_DRAW"
|
||||
"act_loop" "$EGON_FIRE1,$EGON_FIRE2,$EGON_FIRE3,$EGON_FIRE4"
|
||||
"act_fireStop" "$EGON_FIDGET"
|
||||
"act_holster" "$EGON_HOLSTER"
|
||||
"act_idle" "0,1"
|
||||
"act_draw" "9"
|
||||
"act_loop" "7,8"
|
||||
"act_fireStop" "1"
|
||||
"act_holster" "10"
|
||||
"fireRate" "0.2"
|
||||
|
||||
"snd_fireStart" "Weapon_Gluon.Start"
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
#define GAUSS_IDLE1 0
|
||||
#define GAUSS_IDLE2 1
|
||||
#define GAUSS_FIDGET 2
|
||||
#define GAUSS_SECONDARY_CHARGE 3
|
||||
#define GAUSS_SECONDARY_LOOP 4
|
||||
#define GAUSS_FIRE1 5
|
||||
#define GAUSS_FIRE2 6
|
||||
#define GAUSS_HOLSTER 7
|
||||
#define GAUSS_DRAW 8
|
||||
|
||||
entityDef weapon_gauss
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -16,21 +6,21 @@ entityDef weapon_gauss
|
|||
"editor_usage" "Tau Cannon"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_gauss.mdl"
|
||||
"model_player" "models/p_gauss.mdl"
|
||||
"model_view" "models/v_gauss.mdl"
|
||||
"animPrefix" "gauss"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
// weapon specific
|
||||
"def_fireInfo" "fireInfo_gauss"
|
||||
"def_altFireInfo" "fireInfo_gaussCharge"
|
||||
"def_altFireInfo" "fireInfo_gausscharge"
|
||||
"inv_ammo_uranium" "20"
|
||||
"ammoType" "ammo_uranium"
|
||||
"ammoRequired" "1"
|
||||
"act_idle" "$GAUSS_IDLE1,$GAUSS_IDLE2,$GAUSS_IDLE3"
|
||||
"act_draw" "$GAUSS_DRAW"
|
||||
"act_holster" "$GAUSS_HOLSTER"
|
||||
"act_idle" "0,1,2"
|
||||
"act_draw" "8"
|
||||
"act_holster" "7"
|
||||
"powerAmmo" "1"
|
||||
"snd_fire" "Weapon_Gauss.Fire"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
|
@ -43,13 +33,13 @@ entityDef weapon_gauss
|
|||
|
||||
entityDef projectile_gauss
|
||||
{
|
||||
"spawnclass" "hlGaussBeam"
|
||||
"spawnclass" "HLGaussBeam"
|
||||
}
|
||||
|
||||
|
||||
entityDef projectile_gaussCharge
|
||||
entityDef projectile_gausscharge
|
||||
{
|
||||
"spawnclass" "hlGaussBeam"
|
||||
"spawnclass" "HLGaussBeam"
|
||||
"charged" "1"
|
||||
}
|
||||
|
||||
|
@ -59,14 +49,14 @@ entityDef fireInfo_gauss
|
|||
"ammoPerShot" "2"
|
||||
"fireRate" ".2"
|
||||
"punchAngle" "-2 0 0"
|
||||
"act_fire" "$GAUSS_FIRE1,$GAUSS_FIRE2"
|
||||
"act_fire" "5,6"
|
||||
"model_flash" "sprites/muzzleflash2.spr"
|
||||
}
|
||||
|
||||
entityDef fireInfo_gaussCharge
|
||||
entityDef fireInfo_gausscharge
|
||||
{
|
||||
"def_onFire" "projectile_gaussCharge"
|
||||
"def_onRelease" "projectile_gaussCharge"
|
||||
"def_onFire" "projectile_gausscharge"
|
||||
"def_onRelease" "projectile_gausscharge"
|
||||
"ammoPerShot" "5"
|
||||
"fireRate" "2"
|
||||
"punchAngle" "-2 0 0"
|
||||
|
@ -75,8 +65,8 @@ entityDef fireInfo_gaussCharge
|
|||
"snd_fire" "Weapon_Gauss.StaticDischarge"
|
||||
"snd_release" "Weapon_Gauss.Fire"
|
||||
"chargeTime" "5"
|
||||
"act_release" "$GAUSS_FIRE1,$GAUSS_FIRE2"
|
||||
"act_delay" "$GAUSS_SECONDARY_CHARGE"
|
||||
"act_loop" "$GAUSS_SECONDARY_LOOP"
|
||||
"act_release" "5,6"
|
||||
"act_delay" "3"
|
||||
"act_loop" "4"
|
||||
"knockbackRelease" "384"
|
||||
}
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
#define GRENADE_IDLE 0
|
||||
#define GRENADE_FIDGET 1
|
||||
#define GRENADE_CHARGE 2
|
||||
#define GRENADE_FIRE1 3
|
||||
#define GRENADE_FIRE2 4
|
||||
#define GRENADE_FIRE3 5
|
||||
#define GRENADE_HOLSTER 6
|
||||
#define GRENADE_DRAW 7
|
||||
|
||||
entityDef weapon_handgrenade
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -15,11 +6,11 @@ entityDef weapon_handgrenade
|
|||
"editor_usage" "Hand Grenade"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_grenade.mdl"
|
||||
"model_player" "models/p_grenade.mdl"
|
||||
"model_view" "models/v_grenade.mdl"
|
||||
"animPrefix" "crowbar"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
"inv_name" "Hand Grenade"
|
||||
"inv_weapon" "weapon_handgrenade"
|
||||
|
@ -34,12 +25,12 @@ entityDef weapon_handgrenade
|
|||
"removeOnEmpty" "1"
|
||||
"drawAfterRelease" "1"
|
||||
|
||||
"act_idle" "$GRENADE_IDLE,$GRENADE_FIDGET"
|
||||
"act_draw" "$GRENADE_DRAW"
|
||||
"act_holster" "$GRENADE_HOLSTER"
|
||||
"act_fire" "$GRENADE_DRAW"
|
||||
"act_delay" "$GRENADE_CHARGE"
|
||||
"act_release" "$GRENADE_FIRE1,$GRENADE_FIRE2,$GRENADE_FIRE3"
|
||||
"act_idle" "0,1"
|
||||
"act_draw" "7"
|
||||
"act_holster" "6"
|
||||
"act_fire" "7"
|
||||
"act_delay" "2"
|
||||
"act_release" "3,4,5"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "4"
|
||||
|
@ -70,6 +61,7 @@ entityDef projectile_handgrenade
|
|||
"explode_light_color" "1 0.5 0"
|
||||
"explode_light_radius" "1024"
|
||||
"explode_light_fadetime" "3"
|
||||
|
||||
}
|
||||
|
||||
entityDef damage_handgrenadeDirect
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
#define HIVE_IDLE 0
|
||||
#define HIVE_FIDGET1 1
|
||||
#define HIVE_FIDGET2 2
|
||||
#define HIVE_HOLSTER 3
|
||||
#define HIVE_DRAW 4
|
||||
#define HIVE_FIRE 5
|
||||
|
||||
entityDef weapon_hornetgun
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -13,10 +6,11 @@ entityDef weapon_hornetgun
|
|||
"editor_usage" "Hornet Gun"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_hgun.mdl"
|
||||
"model_view" "models/v_hgun.mdl"
|
||||
"animPrefix" "hive"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
// weapon specific
|
||||
"def_fireInfo" "fireInfo_hornetgun"
|
||||
|
@ -24,10 +18,10 @@ entityDef weapon_hornetgun
|
|||
"inv_name" "Hornet Gun"
|
||||
"inv_ammo_hornet" "8"
|
||||
|
||||
"act_fire" "$HIVE_FIRE"
|
||||
"act_holster" "$HIVE_HOLSTER"
|
||||
"act_draw" "$HIVE_DRAW"
|
||||
"act_idle" "$HIVE_IDLE,$HIVE_FIDGET1,$HIVE_FIDGET2"
|
||||
"act_fire" "5"
|
||||
"act_holster" "3"
|
||||
"act_draw" "4"
|
||||
"act_idle" "0,1,2"
|
||||
|
||||
"snd_fire" "Weapon_Hornetgun.Single"
|
||||
|
||||
|
@ -41,16 +35,14 @@ entityDef weapon_hornetgun
|
|||
|
||||
entityDef projectile_hornet
|
||||
{
|
||||
"inherit" "ranged_agrunt_shot_orange
|
||||
"
|
||||
"inherit" "ranged_agrunt_shot_orange
"
|
||||
"damage" "10"
|
||||
"offset" "24 8 -16"
|
||||
}
|
||||
|
||||
entityDef projectile_hornet_red
|
||||
{
|
||||
"inherit" "ranged_agrunt_shot_red
|
||||
"
|
||||
"inherit" "ranged_agrunt_shot_red
"
|
||||
"damage" "10"
|
||||
"offset" "24 8 -16"
|
||||
}
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
#define RPG_IDLE 0
|
||||
#define RPG_FIDGET 1
|
||||
#define RPG_RELOAD 2
|
||||
#define RPG_FIRE 3
|
||||
#define RPG_HOLSTER 4
|
||||
#define RPG_DRAW 5
|
||||
#define RPG_HOLSTER_EMPTY 6
|
||||
#define RPG_DRAW_EMPTY 7
|
||||
#define RPG_IDLE_EMPTY 8
|
||||
#define RPG_FIDGET_EMPTY 9
|
||||
|
||||
entityDef weapon_rpg
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -17,11 +6,11 @@ entityDef weapon_rpg
|
|||
"editor_usage" "Rocket Launcher"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_rpg.mdl"
|
||||
"model_player" "models/p_rpg.mdl"
|
||||
"model_view" "models/v_rpg.mdl"
|
||||
"animPrefix" "rpg"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
"def_fireInfo" "fireInfo_rpg"
|
||||
"def_altFireInfo" "fireInfo_rpg_homing"
|
||||
|
@ -34,15 +23,15 @@ entityDef weapon_rpg
|
|||
"snd_fire" "Weapon_RPG.Single"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
|
||||
"act_idle" "$RPG_IDLE,$RPG_FIDGET"
|
||||
"act_idleEmpty" "$RPG_IDLE_EMPTY,$RPG_FIDGET_EMPTY"
|
||||
"act_holster" "$RPG_HOLSTER"
|
||||
"act_holsterEmpty" "$RPG_HOLSTER_EMPTY"
|
||||
"act_draw" "$RPG_DRAW"
|
||||
"act_drawEmpty" "$RPG_DRAW_EMPTY"
|
||||
"act_fire" "$RPG_FIRE"
|
||||
"act_reload" "$RPG_RELOAD"
|
||||
"act_release" "$RPG_RELOAD"
|
||||
"act_idle" "0,1"
|
||||
"act_idleEmpty" "8,9"
|
||||
"act_holster" "4"
|
||||
"act_holsterEmpty" "6"
|
||||
"act_draw" "5"
|
||||
"act_drawEmpty" "7"
|
||||
"act_fire" "3"
|
||||
"act_reload" "2"
|
||||
"act_release" "2"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "3"
|
||||
|
@ -81,7 +70,8 @@ entityDef projectile_rocket
|
|||
"light_color" "1 1 1"
|
||||
"light_radius" "160"
|
||||
"light_offset" "0 0 0"
|
||||
"detonate_offset" "64"
|
||||
"detonate_offset" "24"
|
||||
"detonate_offset" "64"
|
||||
|
||||
"explode_light_color" "1 0.5 0"
|
||||
"explode_light_radius" "1024"
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
#define SATCHEL_IDLE 0
|
||||
#define SATCHEL_FIDGET 1
|
||||
#define SATCHEL_DRAW 2
|
||||
#define SATCHEL_FIRE 3
|
||||
#define SATCHEL_HOLSTER 4
|
||||
|
||||
// Thankfully both viewmodels
|
||||
// have the same ACT order
|
||||
|
||||
entityDef weapon_satchel
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -15,21 +6,20 @@ entityDef weapon_satchel
|
|||
"editor_usage" "Satchel"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_satchel.mdl"
|
||||
"model_player" "models/p_satchel.mdl"
|
||||
"model_view" "models/v_satchel.mdl"
|
||||
"animPrefix" "onehand"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
"def_fireInfo" "fireInfo_satchel_primary"
|
||||
"def_altFireInfo" "fireInfo_satchel_secondary"
|
||||
"ammoType" "ammo_satchel"
|
||||
"inv_ammo_satchel" "1"
|
||||
|
||||
"act_idle" "$SATCHEL_IDLE,$SATCHEL_FIDGET"
|
||||
"act_draw" "$SATCHEL_DRAW"
|
||||
"act_fire" "$SATCHEL_FIRE"
|
||||
"act_holster" "$SATCHEL_HOLSTER"
|
||||
"act_idle" "0,1"
|
||||
"act_draw" "2"
|
||||
"act_fire" "3"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "4"
|
||||
|
@ -53,15 +43,13 @@ entityDef projectile_satchel
|
|||
"snd_bounce" "SatchelCharge.Bounce"
|
||||
"inherit_velocity" "1"
|
||||
|
||||
"def_splash_damage" "damage_satchelExplosion"
|
||||
"model_detonate" "fx_explosion.main"
|
||||
"snd_explode" "fx.explosion"
|
||||
"decal_detonate" "ExplosionScorch"
|
||||
"def_splash_damage" "damage_satchelExplosion"
|
||||
"model_detonate" "fx_explosion.main"
|
||||
"snd_explode" "fx.explosion"
|
||||
"decal_detonate" "ExplosionScorch"
|
||||
"explode_light_color" "1 0.5 0"
|
||||
"explode_light_radius" "1024"
|
||||
"explode_light_fadetime" "3"
|
||||
|
||||
|
||||
}
|
||||
|
||||
entityDef damage_satchelExplosion
|
||||
|
@ -85,7 +73,5 @@ entityDef fireInfo_satchel_secondary
|
|||
"fireRate" "1.0"
|
||||
"removeOnEmpty" "1"
|
||||
"ammoRequired" "1"
|
||||
"model_player" "models/p_satchel_radio.mdl"
|
||||
"model_view" "models/v_satchel_radio.mdl"
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
#define SHOTGUN_IDLE1 0
|
||||
#define SHOTGUN_FIRE 1
|
||||
#define SHOTGUN_SECONDARY 2
|
||||
#define SHOTGUN_RELOAD 3
|
||||
#define SHOTGUN_RELOAD_END 4
|
||||
#define SHOTGUN_RELOAD_START 5
|
||||
#define SHOTGUN_DRAW 6
|
||||
#define SHOTGUN_HOLSTER 7
|
||||
#define SHOTGUN_IDLE2 8
|
||||
#define SHOTGUN_IDLE3 9
|
||||
|
||||
entityDef weapon_shotgun
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -17,11 +6,11 @@ entityDef weapon_shotgun
|
|||
"editor_usage" "Shotgun"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_shotgun.mdl"
|
||||
"model_player" "models/p_shotgun.mdl"
|
||||
"model_view" "models/v_shotgun.mdl"
|
||||
"animPrefix" "shotgun"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
// weapon specific
|
||||
"def_fireInfo" "fireInfo_shotgun"
|
||||
|
@ -32,8 +21,6 @@ entityDef weapon_shotgun
|
|||
"ammoType" "ammo_buckshot"
|
||||
"ammoRequired" "1"
|
||||
"model_flash" "sprites/muzzleflash2.spr"
|
||||
"def_ejectBrass" "debris_shell"
|
||||
"ejectBrassOffset" "20 7 -12"
|
||||
|
||||
"ammoIcon" "weapon_shotgun.ammo"
|
||||
"ammo2Icon" "weapon_shotgun.ammo2"
|
||||
|
@ -41,20 +28,19 @@ entityDef weapon_shotgun
|
|||
"icon" "weapon_shotgun.weapon"
|
||||
"iconSelected" "weapon_shotgun.weapon_s"
|
||||
|
||||
"act_fire" "$SHOTGUN_FIRE"
|
||||
"act_holster" "$SHOTGUN_HOLSTER"
|
||||
"act_reloadStart" "$SHOTGUN_RELOAD_START"
|
||||
"act_reload" "$SHOTGUN_RELOAD"
|
||||
"act_reloadEnd" "$SHOTGUN_RELOAD_END"
|
||||
"act_draw" "$SHOTGUN_DRAW"
|
||||
"act_idle" "$SHOTGUN_IDLE1,$SHOTGUN_IDLE2,$SHOTGUN_IDLE3"
|
||||
"act_fire" "1"
|
||||
"act_holster" "7"
|
||||
"act_reloadStart" "5"
|
||||
"act_reload" "3"
|
||||
"act_reloadEnd" "4"
|
||||
"act_draw" "6"
|
||||
"act_idle" "0,8,9"
|
||||
|
||||
"snd_fire" "Weapon_Shotgun.Single"
|
||||
"snd_empty" "Weapons.Empty"
|
||||
"snd_ejectBrass" "Weapon_Shotgun.Special1"
|
||||
|
||||
"snd_reload" "Weapon_Shotgun.Reload"
|
||||
"snd_reloadEnd" "Weapon_Shotgun.Special1"
|
||||
"snd_reload_end" "Weapon_Shotgun.Special1"
|
||||
|
||||
// hlWeapon specific
|
||||
"hudSlot" "2"
|
||||
|
@ -84,7 +70,6 @@ entityDef fireInfo_shotgun
|
|||
"ammoPerShot" "1"
|
||||
"fireRate" "0.75"
|
||||
"punchAngle" "-5 0 0"
|
||||
"ejectBrassDelay" "50"
|
||||
}
|
||||
|
||||
entityDef fireInfo_altShotgun
|
||||
|
@ -92,10 +77,9 @@ entityDef fireInfo_altShotgun
|
|||
"def_onFire" "projectile_shotgun_alt"
|
||||
"ammoPerShot" "2"
|
||||
"fireRate" "1.5"
|
||||
"act_fire" "$SHOTGUN_SECONDARY"
|
||||
"act_fire" "2"
|
||||
"punchAngle" "-10 0 0"
|
||||
"snd_fire" "Weapon_Shotgun.Double"
|
||||
"ejectBrassDelay" "80"
|
||||
}
|
||||
|
||||
// multiplayer version
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
#define SNARK_IDLE 0
|
||||
#define SNARK_FIDGET1 1
|
||||
#define SNARK_FIDGET2 2
|
||||
#define SNARK_HOLSTER 3
|
||||
#define SNARK_DRAW 4
|
||||
#define SNARK_FIRE 5
|
||||
|
||||
entityDef weapon_snark
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -13,12 +6,12 @@ entityDef weapon_snark
|
|||
"editor_usage" "Snark"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/w_sqknest.mdl"
|
||||
"model_player" "models/p_squeak.mdl"
|
||||
"model_view" "models/v_squeak.mdl"
|
||||
"frame" "1" // World Model has no static idle, so we set frame instead
|
||||
"animPrefix" "squeak"
|
||||
"frame" "1"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
"inv_name" "Snark"
|
||||
"inv_weapon" "weapon_snark"
|
||||
|
@ -29,10 +22,10 @@ entityDef weapon_snark
|
|||
"silent_fire" "1"
|
||||
"primed_fuse" "4"
|
||||
|
||||
"act_idle" "$SNARK_IDLE,$SNARK_FIDGET1,$SNARK_FIDGET2"
|
||||
"act_draw" "$SNARK_DRAW"
|
||||
"act_holster" "$SNARK_HOLSTER"
|
||||
"act_fire" "$SNARK_FIRE"
|
||||
"act_idle" "0,1,2"
|
||||
"act_draw" "4"
|
||||
"act_holster" "3"
|
||||
"act_throw" "5"
|
||||
"removeOnEmpty" "1"
|
||||
|
||||
// hlWeapon specific
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
#define TRIPMINE_IDLE1 0
|
||||
#define TRIPMINE_IDLE2 1
|
||||
#define TRIPMINE_RESET 2
|
||||
#define TRIPMINE_FIRE 3
|
||||
#define TRIPMINE_FIDGET 4
|
||||
#define TRIPMINE_HOLSTER 5
|
||||
#define TRIPMINE_DRAW 6
|
||||
#define TRIPMINE_PLANT_WALL 7
|
||||
#define TRIPMINE_PLANT_GROUND 8
|
||||
|
||||
entityDef weapon_tripmine
|
||||
{
|
||||
"editor_color" ".3 .3 1"
|
||||
|
@ -16,24 +6,24 @@ entityDef weapon_tripmine
|
|||
"editor_usage" "Tripmine"
|
||||
"editor_rotatable" "1"
|
||||
|
||||
"inherit" "weapon_base"
|
||||
"spawnclass" "hlWeapon"
|
||||
"model" "models/v_tripmine.mdl"
|
||||
"model_player" "models/p_tripmine.mdl"
|
||||
"model_view" "models/v_tripmine.mdl"
|
||||
"body0" "2" // World Model is unusual, so we must set body and frame instead
|
||||
"body0" "2"
|
||||
"body1" "2"
|
||||
"frame" "8"
|
||||
"animPrefix" "tripmine"
|
||||
"snd_acquire" "Player.PickupWeapon"
|
||||
"snd_respawn" "item.respawn"
|
||||
|
||||
"def_fireInfo" "fireInfo_tripminePlant"
|
||||
|
||||
"inv_ammo_tripmine" "1"
|
||||
"ammoType" "ammo_tripmine"
|
||||
"ammoRequired" "1"
|
||||
"act_idle" "$TRIPMINE_IDLE1,$TRIPMINE_IDLE2,$TRIPMINE_FIDGET"
|
||||
"act_fire" "$TRIPMINE_FIRE"
|
||||
"act_draw" "$TRIPMINE_DRAW"
|
||||
"act_holster" "$TRIPMINE_HOLSTER"
|
||||
"act_idle" "0,1,4"
|
||||
"act_fire" "3"
|
||||
"act_draw" "6"
|
||||
"act_holster" "5"
|
||||
"removeOnEmpty" "1"
|
||||
"snd_fire" "TripmineGrenade.Deploy"
|
||||
|
||||
|
|
|
@ -5,7 +5,5 @@ set con_color "255 150 0"
|
|||
set vgui_color "255 170 0"
|
||||
set cross_color "0 255 0"
|
||||
set r_menutint "0.157 0.094 0.0"
|
||||
//set con_textfont "CONCHARS?fmt=hl"
|
||||
//set con_textsize "-12"
|
||||
set con_textfont "fonts/IBMPlexMono-Text.otf?col=1,1,1"
|
||||
set con_textsize "-14"
|
||||
set con_textfont "CONCHARS?fmt=hl"
|
||||
set con_textsize "-12"
|
||||
|
|
2
engine.h
2
engine.h
|
@ -9,7 +9,7 @@
|
|||
#define GAME_BASEGAMES "valve"
|
||||
#define GAME_PROTOCOL "FTE-RadTherapy"
|
||||
|
||||
#define BRANDING_ICON "valve.ico"
|
||||
#define BRANDING_ICON "freecs.ico"
|
||||
#define DISTRIBUTION "FHL"
|
||||
#define DISTRIBUTIONLONG "eukara"
|
||||
#define GAME_FULLNAME FULLENGINENAME
|
||||
|
|
BIN
icon.ico
BIN
icon.ico
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
|
@ -1,36 +0,0 @@
|
|||
// did you expect to see a bad weather joke?
|
||||
r_part main
|
||||
{
|
||||
type texturedspark
|
||||
texture ball
|
||||
tcoords 1 65 31 95 256 8 32
|
||||
scale 1
|
||||
count 1
|
||||
scalefactor 2
|
||||
alpha 0.05
|
||||
die 5
|
||||
rgb 255 255 255
|
||||
gravity 400
|
||||
veladd 1
|
||||
|
||||
cliptype rainsplash
|
||||
clipbounce 1
|
||||
clipcount 5
|
||||
}
|
||||
|
||||
r_part rainsplash
|
||||
{
|
||||
type texturedspark
|
||||
texture ball
|
||||
tcoords 1 65 31 95 256 8 32
|
||||
scale 1
|
||||
count 5
|
||||
scalefactor 1
|
||||
alpha 0.1
|
||||
die 0.2
|
||||
rgb 255 255 255
|
||||
blend add
|
||||
spawnvel 256
|
||||
veladd 200
|
||||
gravity 600
|
||||
}
|
|
@ -58,11 +58,3 @@ Blood.Alien
|
|||
"{yblood7" "1"
|
||||
"{yblood8" "1"
|
||||
}
|
||||
|
||||
// OPPOSING FORCE (1999)
|
||||
ShockScorch
|
||||
{
|
||||
"{ofscorch1" "1"
|
||||
"{ofscorch2" "1"
|
||||
"{ofscorch3" "1"
|
||||
}
|
||||
|
|
|
@ -25,6 +25,14 @@ vector g_hud_color;
|
|||
vector g_hudmins;
|
||||
vector g_hudres;
|
||||
|
||||
var string g_hud1_spr;
|
||||
var string g_hud2_spr;
|
||||
var string g_hud3_spr;
|
||||
var string g_hud4_spr;
|
||||
var string g_hud5_spr;
|
||||
var string g_hud6_spr;
|
||||
var string g_hud7_spr;
|
||||
var string g_cross_spr;
|
||||
var string g_laser_spr;
|
||||
|
||||
/* muzzleflash indices */
|
||||
|
|
|
@ -23,7 +23,6 @@ ClientGame_PreDraw(void)
|
|||
void
|
||||
ClientGame_PostDraw(void)
|
||||
{
|
||||
#if 0
|
||||
if (pSeatLocal->m_flTitleAlpha > 0.0) {
|
||||
vector title1Pos = g_hudmins + (g_hudres / 2) + [-238,-15];
|
||||
vector title2Pos = g_hudmins + (g_hudres / 2) + [18,-15];
|
||||
|
@ -59,5 +58,4 @@ ClientGame_PostDraw(void)
|
|||
|
||||
pSeatLocal->m_flTitleAlpha -= frametime;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) 2023-2024 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
string m_strImage;
|
||||
vector m_vecSize;
|
||||
vector m_vecCanvasSize;
|
||||
vector m_vecCanvasPos;
|
||||
} hlsprite_t;
|
||||
|
||||
void HLSprite_Init(void);
|
||||
|
||||
void HLSprite_Draw_RGBA(string spriteName, vector spritePos, vector spriteColor, float spriteAlpha, bool isAdditive);
|
||||
|
||||
void HLSprite_Draw(string spriteName, vector spritePos, bool isAdditive);
|
||||
|
||||
void HLSprite_Draw_A(string spriteName, vector spritePos, float spriteAlpha, bool isAdditive);
|
||||
|
||||
void HLSprite_Draw_RGB(string spriteName, vector spritePos, vector spriteColor, bool isAdditive);
|
||||
|
||||
void HLSprite_DrawCrosshair(string spriteName);
|
|
@ -0,0 +1,206 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
hlsprite_t *g_hlsprites;
|
||||
var hashtable g_hashhlsprite;
|
||||
var int g_hlSpriteCount;
|
||||
|
||||
static int
|
||||
HLSprite_CountEntriesInFile(string fileName)
|
||||
{
|
||||
int spriteCount = 0i;
|
||||
filestream hudFile;
|
||||
string line;
|
||||
int c = 0i;
|
||||
|
||||
hudFile = fopen(fileName, FILE_READ);
|
||||
|
||||
if (hudFile < 0) {
|
||||
ncError("Missing file %S", fileName);
|
||||
return (-1i);
|
||||
}
|
||||
|
||||
/* count valid entries */
|
||||
while ((line = fgets(hudFile))) {
|
||||
c = tokenize_console(line);
|
||||
|
||||
if (c != 7) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (argv(1) != "640") {
|
||||
continue;
|
||||
}
|
||||
|
||||
spriteCount += 1i;
|
||||
}
|
||||
|
||||
fclose(hudFile);
|
||||
|
||||
return (spriteCount);
|
||||
}
|
||||
|
||||
static bool
|
||||
HLSprite_LoadFromFile(string fileName, string prefix)
|
||||
{
|
||||
filestream hudFile;
|
||||
int c = 0i;
|
||||
vector imgSize = g_vec_null;
|
||||
string line = "";
|
||||
string sheetName;
|
||||
|
||||
hudFile = fopen(fileName, FILE_READ);
|
||||
|
||||
if (hudFile < 0) {
|
||||
ncError("Missing file %S", fileName);
|
||||
return (false);
|
||||
}
|
||||
|
||||
while ((line = fgets(hudFile))) {
|
||||
c = tokenize_console(line);
|
||||
|
||||
if (c != 7)
|
||||
continue;
|
||||
|
||||
if (argv(1) != "640")
|
||||
continue;
|
||||
|
||||
if (prefix != "")
|
||||
sheetName = strcat(prefix, argv(0));
|
||||
else
|
||||
sheetName = argv(0);
|
||||
|
||||
//printf("%S %S\n", sheetName, prefix);
|
||||
|
||||
g_hlsprites[g_hlSpriteCount].m_strImage = spriteframe(sprintf("sprites/%s.spr", argv(2)), 0, 0.0f);
|
||||
g_hlsprites[g_hlSpriteCount].m_vecSize[0] = stof(argv(5));
|
||||
g_hlsprites[g_hlSpriteCount].m_vecSize[1] = stof(argv(6));
|
||||
imgSize = drawgetimagesize(g_hlsprites[g_hlSpriteCount].m_strImage);
|
||||
g_hlsprites[g_hlSpriteCount].m_vecCanvasPos[0] = stof(argv(3)) / imgSize[0];
|
||||
g_hlsprites[g_hlSpriteCount].m_vecCanvasPos[1] = stof(argv(4)) / imgSize[1];
|
||||
g_hlsprites[g_hlSpriteCount].m_vecCanvasSize[0] = g_hlsprites[g_hlSpriteCount].m_vecSize[0] / imgSize[0];
|
||||
g_hlsprites[g_hlSpriteCount].m_vecCanvasSize[1] = g_hlsprites[g_hlSpriteCount].m_vecSize[1] / imgSize[1];
|
||||
hash_add(g_hashhlsprite, sheetName, (int)g_hlSpriteCount);
|
||||
g_hlSpriteCount += 1i;
|
||||
}
|
||||
|
||||
fclose(hudFile);
|
||||
return (true);
|
||||
}
|
||||
|
||||
void
|
||||
HLSprite_Init(void)
|
||||
{
|
||||
int spriteCount = 0i;
|
||||
searchhandle sh;
|
||||
string hudFile;
|
||||
string prefix;
|
||||
|
||||
g_hlSpriteCount = 0i;
|
||||
spriteCount = HLSprite_CountEntriesInFile("sprites/hud.txt");
|
||||
|
||||
sh = search_begin("sprites/*weapon_*.txt", TRUE, TRUE);
|
||||
|
||||
for (int i = 0; i < search_getsize(sh); i++) {
|
||||
hudFile = search_getfilename(sh, i);
|
||||
spriteCount += HLSprite_CountEntriesInFile(hudFile);
|
||||
}
|
||||
|
||||
/* if we couldn't find anything, don't bother */
|
||||
if (spriteCount <= 0i)
|
||||
return;
|
||||
|
||||
/* allocate our hashtable */
|
||||
if (!g_hashhlsprite) {
|
||||
g_hashhlsprite = hash_createtab(2, HASH_ADD);
|
||||
}
|
||||
|
||||
/* allocate valid entries */
|
||||
g_hlsprites = memalloc(sizeof(hlsprite_t) * spriteCount);
|
||||
|
||||
/* read the data into our banks */
|
||||
HLSprite_LoadFromFile("sprites/hud.txt", "");
|
||||
|
||||
for (int i = 0; i < search_getsize(sh); i++) {
|
||||
hudFile = search_getfilename(sh, i);
|
||||
prefix = substring(hudFile, 8, -4);
|
||||
HLSprite_LoadFromFile(hudFile, prefix);
|
||||
}
|
||||
|
||||
search_end(sh);
|
||||
ncLog("...initialized %i HL sprites.", spriteCount);
|
||||
}
|
||||
|
||||
void
|
||||
HLSprite_Draw_RGBA(string spriteName, vector spritePos, vector spriteColor, float spriteAlpha, bool isAdditive)
|
||||
{
|
||||
int spriteNum = -1i;
|
||||
|
||||
spriteNum = (int)hash_get(g_hashhlsprite, spriteName, -1i);
|
||||
|
||||
if (spriteNum == -1i) {
|
||||
ncError("Cannot draw sprite %S!", spriteName);
|
||||
return;
|
||||
}
|
||||
|
||||
drawsubpic(
|
||||
spritePos,
|
||||
g_hlsprites[spriteNum].m_vecSize,
|
||||
g_hlsprites[spriteNum].m_strImage,
|
||||
g_hlsprites[spriteNum].m_vecCanvasPos,
|
||||
g_hlsprites[spriteNum].m_vecCanvasSize,
|
||||
spriteColor,
|
||||
spriteAlpha,
|
||||
isAdditive ? DRAWFLAG_ADDITIVE : 0
|
||||
);
|
||||
}
|
||||
|
||||
void
|
||||
HLSprite_Draw(string spriteName, vector spritePos, bool isAdditive)
|
||||
{
|
||||
HLSprite_Draw_RGBA(spriteName, spritePos, [1,1,1], 1.0f, isAdditive);
|
||||
}
|
||||
|
||||
void
|
||||
HLSprite_Draw_A(string spriteName, vector spritePos, float spriteAlpha, bool isAdditive)
|
||||
{
|
||||
HLSprite_Draw_RGBA(spriteName, spritePos, [1,1,1], spriteAlpha, isAdditive);
|
||||
}
|
||||
|
||||
void
|
||||
HLSprite_Draw_RGB(string spriteName, vector spritePos, vector spriteColor, bool isAdditive)
|
||||
{
|
||||
HLSprite_Draw_RGBA(spriteName, spritePos, spriteColor, 1.0f, isAdditive);
|
||||
}
|
||||
|
||||
void
|
||||
HLSprite_DrawCrosshair(string spriteName)
|
||||
{
|
||||
int spriteNum = -1i;
|
||||
|
||||
if (!spriteName) {
|
||||
return;
|
||||
}
|
||||
|
||||
spriteNum = (int)hash_get(g_hashhlsprite, spriteName, -1i);
|
||||
|
||||
if (spriteNum == -1i) {
|
||||
ncError("Cannot draw sprite %S!", spriteName);
|
||||
return;
|
||||
}
|
||||
|
||||
Cross_DrawSub(g_hlsprites[spriteNum].m_strImage, g_hlsprites[spriteNum].m_vecSize, g_hlsprites[spriteNum].m_vecCanvasPos, g_hlsprites[spriteNum].m_vecCanvasSize);
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2025 Marco Cawthorne <marco@icculus.org>
|
||||
* Copyright (c) 2016-2021 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -24,7 +24,14 @@ Comparable to worldspawn in SSQC in that it's mostly used for precaches
|
|||
void
|
||||
ClientGame_Init(float apilevel, string enginename, float engineversion)
|
||||
{
|
||||
Obituary_Init();
|
||||
registercommand("changeclass");
|
||||
registercommand("changeteam");
|
||||
registercommand("chooseteam");
|
||||
|
||||
registercommand("lastinv");
|
||||
registercommand("invnext");
|
||||
registercommand("invprev");
|
||||
}
|
||||
|
||||
void VGUI_ShowMOTD();
|
||||
|
@ -44,6 +51,23 @@ ClientGame_InitDone(void)
|
|||
void
|
||||
ClientGame_RendererRestart(string rstr)
|
||||
{
|
||||
precache.Model("models/v_tripmine.mdl");
|
||||
precache.Model("models/shell.mdl");
|
||||
precache.Model("models/shotgunshell.mdl");
|
||||
|
||||
/* there's also muzzleflash.spr, but that's just MUZZLE_SMALL again */
|
||||
precache.Model("sprites/muzzleflash1.spr");
|
||||
precache.Model("sprites/muzzleflash2.spr");
|
||||
precache.Model("sprites/muzzleflash3.spr");
|
||||
|
||||
MUZZLE_RIFLE = (int)precache.Model("sprites/muzzleflash1.spr");
|
||||
MUZZLE_SMALL = (int)precache.Model("sprites/muzzleflash2.spr");
|
||||
MUZZLE_WEIRD = (int)precache.Model("sprites/muzzleflash3.spr");
|
||||
|
||||
HLSprite_Init();
|
||||
Obituary_Precache();
|
||||
|
||||
FX_GaussBeam_Init();
|
||||
|
||||
BEAM_TRIPMINE = particleeffectnum("weapon_tripmine.beam");
|
||||
}
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#define OBITUARY_LINES 4
|
||||
#define OBITUARY_TIME 5
|
||||
|
||||
/* imagery */
|
||||
typedef struct {
|
||||
string name; /* name of the weapon/type, e.g. d_crowbar */
|
||||
string sprite; /* name of the spritesheet it's from */
|
||||
float size[2]; /* on-screen size in pixels */
|
||||
float src_pos[2]; /* normalized position in the sprite sheet */
|
||||
float src_size[2]; /* normalized size in the sprite sheet */
|
||||
string src_sprite; /* precaching reasons */
|
||||
} obituaryimg_t;
|
||||
|
||||
/* actual obituary storage */
|
||||
typedef struct
|
||||
{
|
||||
string attacker;
|
||||
string victim;
|
||||
string icon;
|
||||
} obituary_t;
|
||||
|
||||
obituary_t g_obituary[OBITUARY_LINES];
|
||||
int g_obituary_count;
|
||||
float g_obituary_time;
|
||||
|
||||
void Obituary_Init(void);
|
||||
void Obituary_Precache(void);
|
||||
void Obituary_Draw(void);
|
||||
void Obituary_Parse(void);
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 Marco Cawthorne <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void
|
||||
Obituary_Init(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Obituary_Precache(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Obituary_Add(string attacker, string victim, string weapon, float flags)
|
||||
{
|
||||
int i;
|
||||
int x, y;
|
||||
x = OBITUARY_LINES;
|
||||
string weaponIcon = "";
|
||||
|
||||
if (attacker == "worldspawn" || attacker == victim) {
|
||||
attacker = "";
|
||||
}
|
||||
|
||||
weaponIcon = EntityDef_GetKeyValue(weapon, "killIcon");
|
||||
|
||||
if (weaponIcon == "") {
|
||||
weaponIcon = "d_skull";
|
||||
}
|
||||
|
||||
/* we're not full yet, so fill up the buffer */
|
||||
if (g_obituary_count < x) {
|
||||
y = g_obituary_count;
|
||||
g_obituary[y].attacker = attacker;
|
||||
g_obituary[y].victim = victim;
|
||||
g_obituary[y].icon = weaponIcon;
|
||||
g_obituary_count++;
|
||||
} else {
|
||||
for (i = 0; i < (x-1); i++) {
|
||||
g_obituary[i].attacker = g_obituary[i+1].attacker;
|
||||
g_obituary[i].victim = g_obituary[i+1].victim;
|
||||
g_obituary[i].icon = g_obituary[i+1].icon;
|
||||
}
|
||||
/* after rearranging, add the newest to the bottom. */
|
||||
g_obituary[x-1].attacker = attacker;
|
||||
g_obituary[x-1].victim = victim;
|
||||
g_obituary[x-1].icon = weaponIcon;
|
||||
}
|
||||
|
||||
g_obituary_time = OBITUARY_TIME;
|
||||
|
||||
#if 0
|
||||
if (g_weapons[weapon].deathmsg) {
|
||||
string conprint = g_weapons[weapon].deathmsg();
|
||||
|
||||
if (conprint != "") {
|
||||
print(sprintf(conprint, attacker, victim));
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
Obituary_Draw(void)
|
||||
{
|
||||
int i;
|
||||
vector pos;
|
||||
vector item;
|
||||
drawfont = Font_GetID(FONT_CON);
|
||||
pos = g_hudmins + [g_hudres[0] - 18, 56];
|
||||
|
||||
if (g_obituary_time <= 0 && g_obituary_count > 0) {
|
||||
for (i = 0; i < (OBITUARY_LINES-1); i++) {
|
||||
g_obituary[i].attacker = g_obituary[i+1].attacker;
|
||||
g_obituary[i].victim = g_obituary[i+1].victim;
|
||||
g_obituary[i].icon = g_obituary[i+1].icon;
|
||||
}
|
||||
g_obituary[OBITUARY_LINES-1].attacker = "";
|
||||
g_obituary[OBITUARY_LINES-1].victim = "";
|
||||
g_obituary[OBITUARY_LINES-1].icon = 0;
|
||||
|
||||
g_obituary_time = OBITUARY_TIME;
|
||||
g_obituary_count--;
|
||||
}
|
||||
|
||||
if (g_obituary_count <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
item = pos;
|
||||
for (i = 0; i < OBITUARY_LINES; i++) {
|
||||
string a, v;
|
||||
|
||||
if (!g_obituary[i].victim) {
|
||||
break;
|
||||
}
|
||||
|
||||
item[0] = pos[0];
|
||||
|
||||
v = g_obituary[i].victim;
|
||||
drawstring_r(item + [0,2], v, [12,12], [1,1,1], 1.0f, 0);
|
||||
item[0] -= stringwidth(v, TRUE, [12,12]) + 4;
|
||||
|
||||
|
||||
//item[0] -= g_obtypes[g_obituary[i].icon].size[0];
|
||||
|
||||
HLSprite_Draw_RGBA(g_obituary[i].icon, item, g_hud_color, 1.0f, true);
|
||||
|
||||
// draw g_obituary[i].icon
|
||||
|
||||
a = g_obituary[i].attacker;
|
||||
drawstring_r(item + [-4,2], a, [12,12], [1,1,1], 1.0f, 0);
|
||||
item[1] += 18;
|
||||
}
|
||||
|
||||
g_obituary_time = max(0, g_obituary_time - clframetime);
|
||||
}
|
||||
|
||||
void
|
||||
Obituary_Parse(void)
|
||||
{
|
||||
string attacker;
|
||||
string victim;
|
||||
string weapon;
|
||||
float flags;
|
||||
|
||||
attacker = readstring();
|
||||
victim = readstring();
|
||||
weapon = readstring();
|
||||
flags = readbyte();
|
||||
|
||||
if (!attacker) {
|
||||
return;
|
||||
}
|
||||
|
||||
Obituary_Add(attacker, victim, weapon, flags);
|
||||
}
|
|
@ -110,7 +110,7 @@ Scores_DrawTeam(ncPlayer pl, vector pos)
|
|||
tmpColor[0] = getplayerkeyfloat(i, "*icon1_r");
|
||||
tmpColor[1] = getplayerkeyfloat(i, "*icon1_g");
|
||||
tmpColor[2] = getplayerkeyfloat(i, "*icon1_b");
|
||||
ncInterfaceSpriteSheet::Draw_RGB(temp, pos - [8, 0], tmpColor, true);
|
||||
HLSprite_Draw_RGB(temp, pos - [8, 0], tmpColor, true);
|
||||
}
|
||||
|
||||
temp = getplayerkeyvalue(i, "*icon2");
|
||||
|
@ -118,7 +118,7 @@ Scores_DrawTeam(ncPlayer pl, vector pos)
|
|||
tmpColor[0] = getplayerkeyfloat(i, "*icon2_r");
|
||||
tmpColor[1] = getplayerkeyfloat(i, "*icon2_g");
|
||||
tmpColor[2] = getplayerkeyfloat(i, "*icon2_b");
|
||||
ncInterfaceSpriteSheet::Draw_RGB(temp, pos + [8, 0], tmpColor, true);
|
||||
HLSprite_Draw_RGB(temp, pos + [8, 0], tmpColor, true);
|
||||
}
|
||||
|
||||
/* Get the latency and align it left to right */
|
||||
|
|
|
@ -42,7 +42,7 @@ VGUITeamSelectButton::OnMouseUp(void)
|
|||
if (teams.TotalClasses(tag) > 0i) {
|
||||
VGUI_ChooseClass(tag);
|
||||
} else {
|
||||
localcmd("cmd join\n");
|
||||
localcmd(sprintf("cmd join\n", tag));
|
||||
}
|
||||
|
||||
winChooseTeam.Hide();
|
||||
|
|
|
@ -38,15 +38,11 @@ VGUI_ShowMOTD(void)
|
|||
VGUI_ChooseTeam();
|
||||
}
|
||||
|
||||
if (winMotd) {
|
||||
winMotd.Hide();
|
||||
}
|
||||
winMotd.Hide();
|
||||
}
|
||||
|
||||
if (MOTD_GetLineCount() < 1i) {
|
||||
VGUI_ShowMOTD_Close();
|
||||
if (MOTD_GetLineCount() < 1i)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!initialized) {
|
||||
initialized = TRUE;
|
||||
|
|
|
@ -1544,7 +1544,6 @@
|
|||
1 particles/fx_explosion.cfg
|
||||
1 particles/fx_impact.cfg
|
||||
1 particles/fx_spark.cfg
|
||||
1 particles/fx_rain.cfg
|
||||
1 particles/impact_default.cfg
|
||||
1 particles/impact_glass.cfg
|
||||
1 particles/impact_unbreakable.cfg
|
||||
|
|
150
src/hud/hud.qc
150
src/hud/hud.qc
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "../../../src/client/api.h"
|
||||
|
||||
font_s FONT_SMALL;
|
||||
font_s FONT_BIG;
|
||||
font_s FONT_WEAPONICON;
|
||||
font_s FONT_WEAPONNUM;
|
||||
|
@ -10,7 +11,7 @@ font_s FONT_VERDANA;
|
|||
font_s FONT_WEAPONTEXT;
|
||||
font_s FONT_WEAPONICON_SEL;
|
||||
|
||||
var vector autocvar_hlhud_fgColor = [1, 170/255, 0];
|
||||
var vector autocvar_hlhud_fgColor = [1.0, 0.86, 0.0];
|
||||
var float autocvar_hlhud_fgAlpha = 0.39f;
|
||||
var float autocvar_hlhud_altBucket = 0.0;
|
||||
var float autocvar_hlhud_bucketNumAlpha = 0.5f;
|
||||
|
@ -23,7 +24,7 @@ var float autocvar_hlhud_hideTime = 3.0f;
|
|||
#include "WeaponSelect.qc"
|
||||
|
||||
|
||||
noref var string g_ammoPic;
|
||||
var string g_ammoPic;
|
||||
HLWeaponSelect weaponSelectionHUD;
|
||||
|
||||
var float g_oldHealth;
|
||||
|
@ -93,7 +94,7 @@ vector g_ammotype[AMMO_COUNT] = {
|
|||
};
|
||||
|
||||
void
|
||||
HLHUD_AmmoNotify_Draw(__inout vector pos)
|
||||
HUD_AmmoNotify_Draw(__inout vector pos)
|
||||
{
|
||||
pos[0] = g_hudMins[0] + g_hudRes[0] - 40;
|
||||
|
||||
|
@ -113,7 +114,7 @@ HLHUD_AmmoNotify_Draw(__inout vector pos)
|
|||
|
||||
/* we'll use the alpha to control the offset so it gently glides down when fading out */
|
||||
pos -= [0, 32 * a]; /* go up a notch */
|
||||
draw.SubPic(pos,
|
||||
drawsubpic(pos,
|
||||
[24,24],
|
||||
g_hud7_spr,
|
||||
srcpos,
|
||||
|
@ -133,7 +134,7 @@ HLHUD_AmmoNotify_Draw(__inout vector pos)
|
|||
}
|
||||
|
||||
void
|
||||
HLHUD_AmmoNotify_Insert(int type, int count)
|
||||
HUD_AmmoNotify_Insert(int type, int count)
|
||||
{
|
||||
if (count <= 0)
|
||||
return;
|
||||
|
@ -221,7 +222,7 @@ HLHUD_DamageNotifyDraw(vector hudmins, vector res)
|
|||
a *= bound(0.0f, g_dmgnotify[i].alpha, 1.0);
|
||||
|
||||
if (i < 4)
|
||||
draw.SubPic(pos,
|
||||
drawsubpic(pos,
|
||||
[64,64],
|
||||
g_dmg1_spr,
|
||||
srcpos,
|
||||
|
@ -231,7 +232,7 @@ HLHUD_DamageNotifyDraw(vector hudmins, vector res)
|
|||
DRAWFLAG_ADDITIVE
|
||||
);
|
||||
else
|
||||
draw.SubPic(pos,
|
||||
drawsubpic(pos,
|
||||
[64,64],
|
||||
g_dmg2_spr,
|
||||
srcpos,
|
||||
|
@ -263,7 +264,7 @@ typedef enum
|
|||
|
||||
#define ITEM_COUNT 3
|
||||
|
||||
noref var string g_item_spr;
|
||||
string g_item_spr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -279,10 +280,9 @@ vector g_itemtype[ITEM_COUNT] = {
|
|||
};
|
||||
|
||||
void
|
||||
HLHUD_ItemNotify_Draw(__inout vector pos)
|
||||
HUD_ItemNotify_Draw(__inout vector pos)
|
||||
{
|
||||
pos[0] = g_hudMins[0] + g_hudRes[0] - 44;
|
||||
|
||||
for (int i = 0; i < ITEM_COUNT; i++) {
|
||||
vector srcpos;
|
||||
float a;
|
||||
|
@ -299,7 +299,7 @@ HLHUD_ItemNotify_Draw(__inout vector pos)
|
|||
|
||||
/* we'll use the alpha to control the offset so it gently glides down when fading out */
|
||||
pos -= [0, 52 * a]; /* go up a notch */
|
||||
draw.SubPic(pos + [-20,0],
|
||||
drawsubpic(pos + [-20,0],
|
||||
[44,44],
|
||||
g_hud2_spr,
|
||||
srcpos,
|
||||
|
@ -322,7 +322,7 @@ HLHUD_ItemNotify_Draw(__inout vector pos)
|
|||
}
|
||||
|
||||
void
|
||||
HLHUD_ItemNotify_Insert(int type, int count)
|
||||
HUD_ItemNotify_Insert(int type, int count)
|
||||
{
|
||||
if (count <= 0) {
|
||||
return;
|
||||
|
@ -338,13 +338,13 @@ HUD_PickedUpItem(string itemClass)
|
|||
{
|
||||
switch (itemClass) {
|
||||
case "item_battery":
|
||||
HLHUD_ItemNotify_Insert(0i, 1i);
|
||||
HUD_ItemNotify_Insert(0i, 1i);
|
||||
break;
|
||||
case "item_healthkit":
|
||||
HLHUD_ItemNotify_Insert(1i, 1i);
|
||||
HUD_ItemNotify_Insert(1i, 1i);
|
||||
break;
|
||||
case "item_longjump":
|
||||
HLHUD_ItemNotify_Insert(2i, 1i);
|
||||
HUD_ItemNotify_Insert(2i, 1i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -409,7 +409,6 @@ HUD_Init(void)
|
|||
void
|
||||
HUD_ReloadVideoResources(void)
|
||||
{
|
||||
#if 0
|
||||
font.Load("fonts/chat.font", FONT_SMALL);
|
||||
font.Load("fonts/font20.font", FONT_BIG);
|
||||
font.Load("fonts/weaponicon.font", FONT_WEAPONICON);
|
||||
|
@ -417,23 +416,22 @@ HUD_ReloadVideoResources(void)
|
|||
font.Load("fonts/weapontext.font", FONT_WEAPONTEXT);
|
||||
font.Load("fonts/weaponnumbers.font", FONT_WEAPONNUM);
|
||||
font.Load("fonts/weaponnumbers_blurry.font", FONT_WEAPONNUMB);
|
||||
#endif
|
||||
|
||||
g_hud1_spr = precache.SpriteFrame("sprites/640hud1.spr", 0, 0.0f);
|
||||
g_hud2_spr = precache.SpriteFrame("sprites/640hud2.spr", 0, 0.0f);
|
||||
g_hud3_spr = precache.SpriteFrame("sprites/640hud3.spr", 0, 0.0f);
|
||||
g_hud4_spr = precache.SpriteFrame("sprites/640hud4.spr", 0, 0.0f);
|
||||
g_hud5_spr = precache.SpriteFrame("sprites/640hud5.spr", 0, 0.0f);
|
||||
g_hud6_spr = precache.SpriteFrame("sprites/640hud6.spr", 0, 0.0f);
|
||||
g_hud7_spr = precache.SpriteFrame("sprites/640hud7.spr", 0, 0.0f);
|
||||
g_hud1_spr = spriteframe("sprites/640hud1.spr", 0, 0.0f);
|
||||
g_hud2_spr = spriteframe("sprites/640hud2.spr", 0, 0.0f);
|
||||
g_hud3_spr = spriteframe("sprites/640hud3.spr", 0, 0.0f);
|
||||
g_hud4_spr = spriteframe("sprites/640hud4.spr", 0, 0.0f);
|
||||
g_hud5_spr = spriteframe("sprites/640hud5.spr", 0, 0.0f);
|
||||
g_hud6_spr = spriteframe("sprites/640hud6.spr", 0, 0.0f);
|
||||
g_hud7_spr = spriteframe("sprites/640hud7.spr", 0, 0.0f);
|
||||
|
||||
g_damage_spr_t = precache.SpriteFrame("sprites/640_pain.spr", 0, 0.0f);
|
||||
g_damage_spr_r = precache.SpriteFrame("sprites/640_pain.spr", 1, 0.0f);
|
||||
g_damage_spr_b = precache.SpriteFrame("sprites/640_pain.spr", 2, 0.0f);
|
||||
g_damage_spr_l = precache.SpriteFrame("sprites/640_pain.spr", 3, 0.0f);
|
||||
g_damage_spr_t = spriteframe("sprites/640_pain.spr", 0, 0.0f);
|
||||
g_damage_spr_r = spriteframe("sprites/640_pain.spr", 1, 0.0f);
|
||||
g_damage_spr_b = spriteframe("sprites/640_pain.spr", 2, 0.0f);
|
||||
g_damage_spr_l = spriteframe("sprites/640_pain.spr", 3, 0.0f);
|
||||
|
||||
g_dmg1_spr = precache.SpriteFrame("sprites/640hud8.spr", 0, 0.0f);
|
||||
g_dmg2_spr = precache.SpriteFrame("sprites/640hud9.spr", 0, 0.0f);
|
||||
g_dmg1_spr = spriteframe("sprites/640hud8.spr", 0, 0.0f);
|
||||
g_dmg2_spr = spriteframe("sprites/640hud9.spr", 0, 0.0f);
|
||||
}
|
||||
|
||||
/* Use first frame for drawing (needs precache) */
|
||||
|
@ -491,9 +489,9 @@ float spr_flash2[4] = {
|
|||
};
|
||||
|
||||
void
|
||||
HLHUD_DrawNumber(int iNumber, vector vecPos, float fAlpha, vector vColor)
|
||||
HUD_DrawNumber(int iNumber, vector vecPos, float fAlpha, vector vColor)
|
||||
{
|
||||
draw.SubPic(vecPos,
|
||||
drawsubpic(vecPos,
|
||||
[24,24],
|
||||
g_hud7_spr,
|
||||
[spr_hudnum[iNumber], 0],
|
||||
|
@ -505,25 +503,25 @@ HLHUD_DrawNumber(int iNumber, vector vecPos, float fAlpha, vector vColor)
|
|||
}
|
||||
|
||||
void
|
||||
HLHUD_DrawNums(float fNumber, vector vecPos, float fAlpha, vector vColor)
|
||||
HUD_DrawNums(float fNumber, vector vecPos, float fAlpha, vector vColor)
|
||||
{
|
||||
int iNumber = fNumber;
|
||||
if (iNumber > 0) {
|
||||
while (iNumber > 0) {
|
||||
HLHUD_DrawNumber((float)iNumber % 10, vecPos, fAlpha, vColor);
|
||||
HUD_DrawNumber((float)iNumber % 10, vecPos, fAlpha, vColor);
|
||||
iNumber = iNumber / 10;
|
||||
vecPos[0] -= 20;
|
||||
}
|
||||
} else {
|
||||
HLHUD_DrawNumber(0, vecPos, fAlpha, vColor);
|
||||
HUD_DrawNumber(0, vecPos, fAlpha, vColor);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
HLHUD_DrawHealth(vector pos, float healthValue)
|
||||
HUD_DrawHealth(vector pos, float healthValue)
|
||||
{
|
||||
if (healthValue > 25) {
|
||||
draw.SubPic(
|
||||
drawsubpic(
|
||||
pos + [-72,-4],
|
||||
[32,32],
|
||||
g_hud7_spr,
|
||||
|
@ -533,9 +531,9 @@ HLHUD_DrawHealth(vector pos, float healthValue)
|
|||
g_healthAlpha,
|
||||
DRAWFLAG_ADDITIVE
|
||||
);
|
||||
HLHUD_DrawNums(healthValue, pos, g_healthAlpha, g_fg_color);
|
||||
HUD_DrawNums(healthValue, pos, g_healthAlpha, g_fg_color);
|
||||
} else {
|
||||
draw.SubPic(
|
||||
drawsubpic(
|
||||
pos + [-72,-4],
|
||||
[32,32],
|
||||
g_hud7_spr,
|
||||
|
@ -545,14 +543,14 @@ HLHUD_DrawHealth(vector pos, float healthValue)
|
|||
g_healthAlpha,
|
||||
DRAWFLAG_ADDITIVE
|
||||
);
|
||||
HLHUD_DrawNums(healthValue, pos, g_healthAlpha, [1,0,0]);
|
||||
HUD_DrawNums(healthValue, pos, g_healthAlpha, [1,0,0]);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
HLHUD_DrawArmor(vector pos, float armorValue)
|
||||
HUD_DrawArmor(vector pos, float armorValue)
|
||||
{
|
||||
draw.SubPic(
|
||||
drawsubpic(
|
||||
pos + [-80,-9],
|
||||
[40,40],
|
||||
g_hud7_spr,
|
||||
|
@ -565,7 +563,7 @@ HLHUD_DrawArmor(vector pos, float armorValue)
|
|||
|
||||
if (armorValue > 0) {
|
||||
float perc = bound(0, (armorValue / 100), 1.0);
|
||||
draw.SubPic(
|
||||
drawsubpic(
|
||||
pos + [-80,-9] + [0, 40 * (1.0-perc)],
|
||||
[40, 40 * perc],
|
||||
g_hud7_spr,
|
||||
|
@ -577,13 +575,13 @@ HLHUD_DrawArmor(vector pos, float armorValue)
|
|||
);
|
||||
}
|
||||
|
||||
HLHUD_DrawNums(armorValue, pos, g_armorAlpha, g_fg_color);
|
||||
HUD_DrawNums(armorValue, pos, g_armorAlpha, g_fg_color);
|
||||
}
|
||||
|
||||
void
|
||||
HUD_DrawSeperator(vector pos)
|
||||
{
|
||||
draw.SubPic(pos,
|
||||
drawsubpic(pos,
|
||||
[2,24],
|
||||
g_hud7_spr,
|
||||
[240/256, 0],
|
||||
|
@ -595,22 +593,22 @@ HUD_DrawSeperator(vector pos)
|
|||
}
|
||||
|
||||
void
|
||||
HLHUD_DrawAmmo1(vector pos, float ammoValue)
|
||||
HUD_DrawAmmo1(vector pos, float ammoValue)
|
||||
{
|
||||
HLHUD_DrawNums(ammoValue, pos, g_clipAlpha, g_fg_color);
|
||||
HUD_DrawNums(ammoValue, pos, g_clipAlpha, g_fg_color);
|
||||
HUD_DrawSeperator(pos + [30,0]);
|
||||
}
|
||||
|
||||
void
|
||||
HLHUD_DrawAmmo2(vector pos, float ammoValue)
|
||||
HUD_DrawAmmo2(vector pos, float ammoValue)
|
||||
{
|
||||
HLHUD_DrawNums(ammoValue, pos, g_ammo1Alpha, g_fg_color);
|
||||
HUD_DrawNums(ammoValue, pos, g_ammo1Alpha, g_fg_color);
|
||||
}
|
||||
|
||||
void
|
||||
HLHUD_DrawAmmo3(vector pos, float ammoValue)
|
||||
HUD_DrawAmmo3(vector pos, float ammoValue)
|
||||
{
|
||||
HLHUD_DrawNums(ammoValue, pos, g_ammo2Alpha, g_fg_color);
|
||||
HUD_DrawNums(ammoValue, pos, g_ammo2Alpha, g_fg_color);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -636,10 +634,10 @@ HUD_Draw(void)
|
|||
|
||||
|
||||
if (1) {
|
||||
pos = g_hudMins + [g_hudRes[0] - 192, g_hudRes[1] - 128];
|
||||
vector pos = g_hudMins + [g_hudRes[0] - 192, g_hudRes[1] - 128];
|
||||
pos[1] += 48;
|
||||
HLHUD_ItemNotify_Draw(pos);
|
||||
HLHUD_AmmoNotify_Draw(pos);
|
||||
HUD_ItemNotify_Draw(pos);
|
||||
HUD_AmmoNotify_Draw(pos);
|
||||
}
|
||||
|
||||
|
||||
|
@ -726,9 +724,9 @@ HUD_Draw(void)
|
|||
}
|
||||
|
||||
pos = hud_mins + [88, hud_size[1] - 42];
|
||||
HLHUD_DrawHealth(pos, healthValue);
|
||||
HUD_DrawHealth(pos, healthValue);
|
||||
pos = hud_mins + [198, hud_size[1] - 42];
|
||||
HLHUD_DrawArmor(pos, armorValue);
|
||||
HUD_DrawArmor(pos, armorValue);
|
||||
|
||||
weaponSelectionHUD.Draw();
|
||||
|
||||
|
@ -742,18 +740,18 @@ HUD_Draw(void)
|
|||
/* ammo 2 */
|
||||
if (weapon.UsesSecondaryAmmo() == true) {
|
||||
pos = hud_mins + [hud_size[0] - 72, hud_size[1] - 74];
|
||||
HLHUD_DrawAmmo3(pos, ammoValue2);
|
||||
HUD_DrawAmmo3(pos, ammoValue2);
|
||||
} else {
|
||||
pos = hud_mins + [hud_size[0] - 102 - 16, hud_size[1] - 48];
|
||||
}
|
||||
|
||||
if (weapon.GetClipSize() > 0) {
|
||||
pos = hud_mins + [hud_size[0] - 152, hud_size[1] - 42];
|
||||
HLHUD_DrawAmmo1(pos, clipValue);
|
||||
HUD_DrawAmmo1(pos, clipValue);
|
||||
}
|
||||
|
||||
pos = hud_mins + [hud_size[0] - 72, hud_size[1] - 42];
|
||||
HLHUD_DrawAmmo2(pos, ammoValue);
|
||||
HUD_DrawAmmo2(pos, ammoValue);
|
||||
|
||||
HLHUD_ClampTimers();
|
||||
}
|
||||
|
@ -890,55 +888,55 @@ HUD_AmmoChanged(int ammoType, int absoluteValue, int deltaValue)
|
|||
the old HUD code. this can be changed to be decl specific at some point! */
|
||||
switch (ammoTypeName) {
|
||||
case "ammo_9mm":
|
||||
HLHUD_AmmoNotify_Insert(0, deltaValue);
|
||||
HUD_AmmoNotify_Insert(0, deltaValue);
|
||||
break;
|
||||
case "ammo_357":
|
||||
HLHUD_AmmoNotify_Insert(1, deltaValue);
|
||||
HUD_AmmoNotify_Insert(1, deltaValue);
|
||||
break;
|
||||
case "ammo_m203_grenade":
|
||||
HLHUD_AmmoNotify_Insert(2, deltaValue);
|
||||
HUD_AmmoNotify_Insert(2, deltaValue);
|
||||
break;
|
||||
case "ammo_buckshot":
|
||||
HLHUD_AmmoNotify_Insert(3, deltaValue);
|
||||
HUD_AmmoNotify_Insert(3, deltaValue);
|
||||
break;
|
||||
case "ammo_bolt":
|
||||
HLHUD_AmmoNotify_Insert(4, deltaValue);
|
||||
HUD_AmmoNotify_Insert(4, deltaValue);
|
||||
break;
|
||||
case "ammo_rocket":
|
||||
HLHUD_AmmoNotify_Insert(5, deltaValue);
|
||||
HUD_AmmoNotify_Insert(5, deltaValue);
|
||||
break;
|
||||
case "ammo_uranium":
|
||||
HLHUD_AmmoNotify_Insert(6, deltaValue);
|
||||
HUD_AmmoNotify_Insert(6, deltaValue);
|
||||
break;
|
||||
case "ammo_hornet":
|
||||
HLHUD_AmmoNotify_Insert(7, deltaValue);
|
||||
HUD_AmmoNotify_Insert(7, deltaValue);
|
||||
break;
|
||||
case "ammo_handgrenade":
|
||||
HLHUD_AmmoNotify_Insert(8, deltaValue);
|
||||
HUD_AmmoNotify_Insert(8, deltaValue);
|
||||
break;
|
||||
case "ammo_satchel":
|
||||
HLHUD_AmmoNotify_Insert(9, deltaValue);
|
||||
HUD_AmmoNotify_Insert(9, deltaValue);
|
||||
break;
|
||||
case "ammo_snark":
|
||||
HLHUD_AmmoNotify_Insert(10, deltaValue);
|
||||
HUD_AmmoNotify_Insert(10, deltaValue);
|
||||
break;
|
||||
case "ammo_tripmine":
|
||||
HLHUD_AmmoNotify_Insert(11, deltaValue);
|
||||
HUD_AmmoNotify_Insert(11, deltaValue);
|
||||
break;
|
||||
case "ammo_556":
|
||||
HLHUD_AmmoNotify_Insert(12, deltaValue);
|
||||
HUD_AmmoNotify_Insert(12, deltaValue);
|
||||
break;
|
||||
case "ammo_762":
|
||||
HLHUD_AmmoNotify_Insert(13, deltaValue);
|
||||
HUD_AmmoNotify_Insert(13, deltaValue);
|
||||
break;
|
||||
case "ammo_spore":
|
||||
HLHUD_AmmoNotify_Insert(14, deltaValue);
|
||||
HUD_AmmoNotify_Insert(14, deltaValue);
|
||||
break;
|
||||
case "ammo_shock":
|
||||
HLHUD_AmmoNotify_Insert(15, deltaValue);
|
||||
HUD_AmmoNotify_Insert(15, deltaValue);
|
||||
break;
|
||||
case "ammo_penguin":
|
||||
HLHUD_AmmoNotify_Insert(16, deltaValue);
|
||||
HUD_AmmoNotify_Insert(16, deltaValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
QCC=fteqcc
|
||||
|
||||
all:
|
||||
mkdir -p ../../progs/
|
||||
mkdir -pv ../../progs/
|
||||
$(QCC) $(CFLAGS) -I../../../src/server deathmatch.qc
|
||||
$(QCC) $(CFLAGS) -I../../../src/server singleplayer.qc
|
||||
$(QCC) $(CFLAGS) -I../../../src/server invasion.qc
|
||||
|
|
|
@ -23,7 +23,7 @@ HLGaussBeam::Launch(vector startPos, vector launchDir, float fuseOffset, float p
|
|||
else
|
||||
FX_GaussBeam(startPos, launchDir, 0, owner);
|
||||
|
||||
//ncError("fuseOffset: %f", fuseOffset);
|
||||
ncError("fuseOffset: %f", fuseOffset);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2023-2025 Marco Cawthorne <marco@icculus.org>
|
||||
* Copyright (c) 2023 Vera Visions LLC.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
@ -227,9 +227,8 @@ hlHUDCounter::ReceiveEntity(float flNew, float flChanged)
|
|||
void
|
||||
hlHUDCounter::postdraw(void)
|
||||
{
|
||||
if (!m_bEnabled) {
|
||||
if (!m_bEnabled)
|
||||
return;
|
||||
}
|
||||
|
||||
float textLength = Font_StringWidth(m_strText, true, FONT_CON);
|
||||
vector vecProj = g_vec_null;
|
||||
|
@ -255,7 +254,7 @@ hlHUDCounter::postdraw(void)
|
|||
drawpic(vecProj, m_strIcon, [64, 64], [1,1,1], a, DRAWFLAG_ADDITIVE);
|
||||
}
|
||||
} else {
|
||||
ncInterfaceSpriteSheet::Draw_RGBA(m_strIcon, vecProj, colormod / 255, a, m_bAdditive);
|
||||
HLSprite_Draw_RGBA(m_strIcon, vecProj, colormod / 255, a, m_bAdditive);
|
||||
}
|
||||
|
||||
/* counter */
|
||||
|
|
|
@ -16,11 +16,26 @@
|
|||
|
||||
#include "animations.h"
|
||||
|
||||
/* all custom SendFlags bits we can possibly send */
|
||||
enumflags
|
||||
{
|
||||
PLAYER_TOPFRAME = PLAYER_CUSTOMFIELDSTART,
|
||||
PLAYER_BOTTOMFRAME
|
||||
};
|
||||
|
||||
class hlPlayer:ncPlayer
|
||||
{
|
||||
void(void) hlPlayer;
|
||||
|
||||
/* animation */
|
||||
PREDICTED_INT(anim_top)
|
||||
PREDICTED_FLOAT(anim_top_time)
|
||||
PREDICTED_FLOAT(anim_top_delay)
|
||||
PREDICTED_INT(anim_bottom)
|
||||
PREDICTED_FLOAT(anim_bottom_time)
|
||||
|
||||
virtual void Physics_Jump(void);
|
||||
virtual void UpdatePlayerAnimation(float);
|
||||
|
||||
#ifdef CLIENT
|
||||
virtual void UpdatePlayerAttachments(bool);
|
||||
|
@ -37,9 +52,29 @@ class hlPlayer:ncPlayer
|
|||
#endif
|
||||
};
|
||||
|
||||
void Animation_PlayerTop(hlPlayer, float, float);
|
||||
void Animation_PlayerBottom(hlPlayer, float, float);
|
||||
|
||||
void
|
||||
hlPlayer::hlPlayer(void)
|
||||
{
|
||||
anim_top = 0;
|
||||
anim_top_time = 0;
|
||||
anim_top_delay = 0;
|
||||
anim_bottom = 0;
|
||||
anim_bottom_time = 0;
|
||||
}
|
||||
|
||||
void Animation_PlayerUpdate(hlPlayer);
|
||||
void Animation_TimerUpdate(hlPlayer, float);
|
||||
|
||||
void
|
||||
hlPlayer::UpdatePlayerAnimation(float timelength)
|
||||
{
|
||||
/* calculate our skeletal progression */
|
||||
Animation_PlayerUpdate(this);
|
||||
/* advance animation timers */
|
||||
Animation_TimerUpdate(this, timelength);
|
||||
}
|
||||
|
||||
#ifdef CLIENT
|
||||
|
@ -51,12 +86,11 @@ void
|
|||
hlPlayer::UpdateAliveCam(void)
|
||||
{
|
||||
vector cam_pos = GetEyePos();
|
||||
vector camOffset = autocvar(pm_thirdPersonAngle, [0,0,0]);
|
||||
Camera_RunPosBob(view_angles, cam_pos);
|
||||
|
||||
g_view.SetCameraOrigin(cam_pos);
|
||||
Camera_StrafeRoll(view_angles);
|
||||
g_view.SetCameraAngle(view_angles + camOffset);
|
||||
g_view.SetCameraAngle(view_angles);
|
||||
|
||||
if (vehicle) {
|
||||
ncVehicle veh = (ncVehicle)vehicle;
|
||||
|
@ -65,7 +99,7 @@ hlPlayer::UpdateAliveCam(void)
|
|||
veh.UpdateView();
|
||||
} else if (health) {
|
||||
if (autocvar_pm_thirdPerson == TRUE) {
|
||||
makevectors(view_angles + camOffset);
|
||||
makevectors(view_angles);
|
||||
vector vStart = [pSeat->m_vecPredictedOrigin[0], pSeat->m_vecPredictedOrigin[1], pSeat->m_vecPredictedOrigin[2] + 16] + (v_right * 4);
|
||||
vector vEnd = vStart + (v_forward * -48) + [0,0,16] + (v_right * 4);
|
||||
traceline(vStart, vEnd, MOVE_NORMAL, this);
|
||||
|
@ -123,7 +157,7 @@ hlPlayer::UpdatePlayerAttachments(bool visible)
|
|||
return;
|
||||
|
||||
/* what's the current weapon model supposed to be anyway? */
|
||||
p_model.oldmodel = modelnameforindex(vw_index);
|
||||
p_model.oldmodel = 0;//Weapons_GetPlayermodel(this, activeweapon);
|
||||
|
||||
/* we changed weapons, update skeletonindex */
|
||||
if (p_model.model != p_model.oldmodel) {
|
||||
|
@ -179,6 +213,13 @@ hlPlayer::ReceiveEntity(float new, float flChanged)
|
|||
/* the generic client attributes */
|
||||
super::ReceiveEntity(new, flChanged);
|
||||
|
||||
/* animation */
|
||||
READENTITY_BYTE(anim_top, PLAYER_TOPFRAME)
|
||||
READENTITY_FLOAT(anim_top_time, PLAYER_TOPFRAME)
|
||||
READENTITY_FLOAT(anim_top_delay, PLAYER_TOPFRAME)
|
||||
READENTITY_BYTE(anim_bottom, PLAYER_BOTTOMFRAME)
|
||||
READENTITY_FLOAT(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
||||
|
||||
setorigin(this, origin);
|
||||
|
||||
/* these only concern the current hlPlayer */
|
||||
|
@ -205,6 +246,12 @@ hlPlayer::PredictPreFrame(void)
|
|||
{
|
||||
/* the generic client attributes */
|
||||
super::PredictPreFrame();
|
||||
|
||||
SAVE_STATE(anim_top)
|
||||
SAVE_STATE(anim_top_delay)
|
||||
SAVE_STATE(anim_top_time)
|
||||
SAVE_STATE(anim_bottom)
|
||||
SAVE_STATE(anim_bottom_time)
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -219,6 +266,12 @@ hlPlayer::PredictPostFrame(void)
|
|||
{
|
||||
/* the generic client attributes */
|
||||
super::PredictPostFrame();
|
||||
|
||||
ROLL_BACK(anim_top)
|
||||
ROLL_BACK(anim_top_delay)
|
||||
ROLL_BACK(anim_top_time)
|
||||
ROLL_BACK(anim_bottom)
|
||||
ROLL_BACK(anim_bottom_time)
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -226,12 +279,33 @@ void
|
|||
hlPlayer::Save(float handle)
|
||||
{
|
||||
super::Save(handle);
|
||||
|
||||
SaveInt(handle, "anim_top", anim_top);
|
||||
SaveFloat(handle, "anim_top_time", anim_top_time);
|
||||
SaveFloat(handle, "anim_top_delay", anim_top_delay);
|
||||
SaveInt(handle, "anim_bottom", anim_bottom);
|
||||
SaveFloat(handle, "anim_bottom_time", anim_bottom_time);
|
||||
}
|
||||
|
||||
void
|
||||
hlPlayer::Restore(string strKey, string strValue)
|
||||
{
|
||||
switch (strKey) {
|
||||
case "anim_top":
|
||||
anim_top = ReadInt(strValue);
|
||||
break;
|
||||
case "anim_top_time":
|
||||
anim_top_time = ReadFloat(strValue);
|
||||
break;
|
||||
case "anim_top_delay":
|
||||
anim_top_delay = ReadFloat(strValue);
|
||||
break;
|
||||
case "anim_bottom":
|
||||
anim_bottom = ReadInt(strValue);
|
||||
break;
|
||||
case "anim_bottom_time":
|
||||
anim_bottom_time = ReadFloat(strValue);
|
||||
break;
|
||||
default:
|
||||
super::Restore(strKey, strValue);
|
||||
}
|
||||
|
@ -243,6 +317,12 @@ hlPlayer::EvaluateEntity(void)
|
|||
/* the generic client attributes */
|
||||
ncPlayer::EvaluateEntity();
|
||||
|
||||
EVALUATE_FIELD(anim_top, PLAYER_TOPFRAME)
|
||||
EVALUATE_FIELD(anim_top_time, PLAYER_TOPFRAME)
|
||||
EVALUATE_FIELD(anim_top_delay, PLAYER_TOPFRAME)
|
||||
EVALUATE_FIELD(anim_bottom, PLAYER_BOTTOMFRAME)
|
||||
EVALUATE_FIELD(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -308,6 +388,12 @@ hlPlayer::SendEntity(entity ePEnt, float flChanged)
|
|||
/* the generic client attributes */
|
||||
ncPlayer::SendEntity(ePEnt, flChanged);
|
||||
|
||||
SENDENTITY_BYTE(anim_top, PLAYER_TOPFRAME)
|
||||
SENDENTITY_FLOAT(anim_top_time, PLAYER_TOPFRAME)
|
||||
SENDENTITY_FLOAT(anim_top_delay, PLAYER_TOPFRAME)
|
||||
SENDENTITY_BYTE(anim_bottom, PLAYER_BOTTOMFRAME)
|
||||
SENDENTITY_FLOAT(anim_bottom_time, PLAYER_BOTTOMFRAME)
|
||||
|
||||
return (1);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -41,8 +41,6 @@ public:
|
|||
|
||||
#ifdef SERVER
|
||||
virtual void SpawnKey(string, string);
|
||||
virtual void FireInfoChanged(void);
|
||||
virtual void SwitchedFromWeapon(void);
|
||||
#endif
|
||||
|
||||
#ifdef CLIENT
|
||||
|
@ -62,8 +60,4 @@ private:
|
|||
ncWeapon m_nextWeapon;
|
||||
#endif
|
||||
bool m_bAltModeLaser;
|
||||
|
||||
#ifdef SERVER
|
||||
ncRenderableEntity m_laserEntity;
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -103,49 +103,6 @@ hlWeapon::AddedToInventory(void)
|
|||
m_bAltModeLaser = GetDefBool("altLaser");
|
||||
}
|
||||
|
||||
#ifdef SERVER
|
||||
|
||||
void
|
||||
hlWeapon::SwitchedFromWeapon(void)
|
||||
{
|
||||
if (m_laserEntity) {
|
||||
m_laserEntity.Destroy();
|
||||
m_laserEntity = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
hlWeapon::FireInfoChanged(void)
|
||||
{
|
||||
static void UpdateLaser(void) {
|
||||
ncEntity ourOwner = (ncEntity)owner;
|
||||
vector src = ourOwner.GetEyePos();
|
||||
vector dir = anglesToForward(owner.v_angle);
|
||||
traceline(src, src + (dir * 4096.0f), MOVE_NORMAL, owner);
|
||||
setorigin(self, trace_endpos + (dir * -4));
|
||||
}
|
||||
|
||||
if (FireInfoSelected() && m_bAltModeLaser) {
|
||||
if (m_laserEntity) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_laserEntity = spawn(ncRenderableEntity);
|
||||
m_laserEntity.SetModel("sprites/laserdot.spr");
|
||||
m_laserEntity.SetRenderMode(RM_ADDITIVE);
|
||||
m_laserEntity.SetRenderColor([255, 255, 255]);
|
||||
m_laserEntity.SetRenderAmt(255);
|
||||
m_laserEntity.customphysics = UpdateLaser;
|
||||
m_laserEntity.owner = owner;
|
||||
} else {
|
||||
if (m_laserEntity) {
|
||||
m_laserEntity.Destroy();
|
||||
m_laserEntity = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CLIENT
|
||||
void
|
||||
hlWeapon::UpdateGUI(void)
|
||||
|
@ -193,6 +150,31 @@ hlWeapon::UpdateGUI(void)
|
|||
drawfill([vMainPos[0] + vSize[0], vMainPos[1]], [1, vSize[1] + 1], g_hud_color, 1.0f); // Right
|
||||
}
|
||||
#endif
|
||||
|
||||
if (RequiresAmmo() == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
ourOwner = (ncPlayer)GetOwner();
|
||||
|
||||
if (GetClipSize() > 0i) {
|
||||
ourOwner.a_ammo1 = GetClip();
|
||||
HUD_DrawAmmo1();
|
||||
}
|
||||
|
||||
ourOwner.a_ammo2 = ourOwner.GetReserveAmmo(m_primaryAmmoType);
|
||||
HUD_DrawAmmo2();
|
||||
|
||||
if (UsesSecondaryAmmo() && m_primaryAmmoType != m_secondaryAmmoType) {
|
||||
ourOwner.a_ammo3 = ourOwner.GetReserveAmmo(m_secondaryAmmoType);
|
||||
HUD_DrawAmmo3();
|
||||
|
||||
/* draw ammo icon */
|
||||
if (STRING_SET(m_ammo2Icon)) {
|
||||
ammoPos = g_hudmins + [g_hudres[0] - 48, g_hudres[1] - 74];
|
||||
HLSprite_Draw_RGBA(m_ammo2Icon, ammoPos, g_hud_color, pSeatLocal->m_flAmmo2Alpha, true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
../../../valve/src/shared/flags.h
|
||||
../../../valve/src/shared/skeleton.h
|
||||
../../../valve/src/shared/Player.qc
|
||||
../../../valve/src/shared/animations.qc
|
||||
../../../valve/src/shared/fx_gaussbeam.qc
|
||||
../../../valve/src/shared/GaussBeam.qc
|
||||
../../../valve/src/shared/Weapon.qc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue