Compare commits

...

15 commits

163 changed files with 2963 additions and 7215 deletions

BIN
.dir.tiff Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
ISC License
Copyright (c) 2016-2021, Marco "eukara" Hladik <marco@icculus.org>
Copyright (c) 2016-2025, Marco "eukara" Cawthorne <marco@icculus.org>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above

1
PAK_NAME Normal file
View file

@ -0,0 +1 @@
package_tfc.pk3

1
PROJECT Normal file
View file

@ -0,0 +1 @@
TeamEffort

View file

@ -1,4 +1,5 @@
# FreeTFC
# ![](img/te.png) Team Effort
Clean-room reimplementation of Team Fortress Classic in QuakeC.
![Preview 1](img/preview1.jpg)
@ -8,8 +9,7 @@ Clone the repository into the Nuclide-SDK:
> git clone REPOURL tfc
then either run Nuclide's ./build_game.sh shell script, or issue 'make' inside
./tfc/src!
Then run `make game GAME=tfc`!
Obviously make sure that Nuclide has fteqw and fteqcc set-up for building.
@ -29,7 +29,7 @@ We've had people ask in the oddest of places for help, please don't do that.
## License
ISC License
Copyright (c) 2016-2021 Marco Hladik <marco@icculus.org>
Copyright (c) 2016-2025 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

99
cfg/skill.cfg Normal file
View file

@ -0,0 +1,99 @@
set sk_plr_ac1 "32"
set sk_plr_ac2 "32"
set sk_plr_ac3 "32"
set sk_plr_autorifle1 "8"
set sk_plr_autorifle2 "8"
set sk_plr_autorifle3 "8"
set sk_plr_bioweapon1 "8"
set sk_plr_bioweapon2 "8"
set sk_plr_bioweapon3 "8"
set sk_plr_bioweapon_infection1 "8"
set sk_plr_bioweapon_infection2 "8"
set sk_plr_bioweapon_infection3 "8"
set sk_plr_crowbar1 "18"
set sk_plr_crowbar2 "18"
set sk_plr_crowbar3 "18"
set sk_plr_flamethrower1 "20"
set sk_plr_flamethrower2 "20"
set sk_plr_flamethrower3 "20"
set sk_plr_flamethrower_afterburn1 "2"
set sk_plr_flamethrower_afterburn2 "2"
set sk_plr_flamethrower_afterburn3 "2"
set sk_plr_incendiarylauncher1 "80"
set sk_plr_incendiarylauncher2 "80"
set sk_plr_incendiarylauncher3 "80"
set sk_plr_incendiarylauncher_splash1 "40"
set sk_plr_incendiarylauncher_splash2 "40"
set sk_plr_incendiarylauncher_splash3 "40"
set sk_plr_knife1 "36"
set sk_plr_knife2 "36"
set sk_plr_knife3 "36"
set sk_plr_medikit_overheal1 "5"
set sk_plr_medikit_overheal2 "5"
set sk_plr_medikit_overheal3 "5"
set sk_plr_nail1 "9"
set sk_plr_nail2 "9"
set sk_plr_nail3 "9"
set sk_plr_nail_super1 "12"
set sk_plr_nail_super2 "12"
set sk_plr_nail_super3 "12"
set sk_player_arm1 "1"
set sk_player_arm2 "1"
set sk_player_arm3 "1"
set sk_player_chest1 "1"
set sk_player_chest2 "1"
set sk_player_chest3 "1"
set sk_player_head1 "3"
set sk_player_head2 "3"
set sk_player_head3 "3"
set sk_player_leg1 "1"
set sk_player_leg2 "1"
set sk_player_leg3 "1"
set sk_player_stomach1 "1"
set sk_player_stomach2 "1"
set sk_player_stomach3 "1"
set sk_plr_shotgun1 "4"
set sk_plr_shotgun2 "4"
set sk_plr_shotgun3 "4"
set sk_plr_shotgun_super1 "4"
set sk_plr_shotgun_super2 "4"
set sk_plr_shotgun_super3 "4"
set sk_plr_pipebomb1 "80"
set sk_plr_pipebomb2 "80"
set sk_plr_pipebomb3 "80"
set sk_plr_pipebomb_splash1 "40"
set sk_plr_pipebomb_splash2 "40"
set sk_plr_pipebomb_splash3 "40"
set sk_plr_railgun1 "23"
set sk_plr_railgun2 "23"
set sk_plr_railgun3 "23"
set sk_plr_railgun_charge1 "100"
set sk_plr_railgun_charge2 "100"
set sk_plr_railgun_charge3 "100"
set sk_plr_railgun_charge_splash1 "25"
set sk_plr_railgun_charge_splash2 "25"
set sk_plr_railgun_charge_splash3 "25"
set sk_plr_rpg1 "100"
set sk_plr_rpg2 "100"
set sk_plr_rpg3 "100"
set sk_plr_rpg_splash1 "25"
set sk_plr_rpg_splash2 "25"
set sk_plr_rpg_splash3 "25"
set sk_plr_sniperrifle1 "18"
set sk_plr_sniperrifle2 "18"
set sk_plr_sniperrifle3 "18"
set sk_plr_spanner1 "18"
set sk_plr_spanner2 "18"
set sk_plr_spanner3 "18"
set sk_plr_stickybomb1 "80"
set sk_plr_stickybomb2 "80"
set sk_plr_stickybomb3 "80"
set sk_plr_stickybomb_splash1 "40"
set sk_plr_stickybomb_splash2 "40"
set sk_plr_stickybomb_splash3 "40"
set sk_plr_tranq1 "18"
set sk_plr_tranq2 "18"
set sk_plr_tranq3 "18"
set sk_plr_umbrella1 "18"
set sk_plr_umbrella2 "18"
set sk_plr_umbrella3 "18"

1
cfg/skill_manifest.cfg Normal file
View file

@ -0,0 +1 @@
exec "skill.cfg"

30
decls/def/ammo.def Normal file
View file

@ -0,0 +1,30 @@
// these have to be defined by the game.
entityDef ammo_types {
"ammo_none" "0"
"ammo_rockets" "1"
"ammo_nails" "2"
"ammo_cells" "3"
"ammo_shells" "4"
"ammo_medkits" "5"
"ammo_detpack" "6"
}
entityDef ammo_names {
"ammo_none" "None"
"ammo_rockets" "Rockets"
"ammo_nails" "Nails"
"ammo_cells" "Cells"
"ammo_shells" "Shells"
"ammo_medkits" "Medkit"
"ammo_detpack" "Depack"
}
entityDef ammo_max {
"ammo_none" "0"
"ammo_rockets" "255"
"ammo_nails" "255"
"ammo_cells" "255"
"ammo_shells" "255"
"ammo_medkits" "255"
"ammo_detpack" "255"
}

8
decls/def/items.def Normal file
View file

@ -0,0 +1,8 @@
entityDef item_suit
{
"spawnclass" "ncItem"
"model" "models/w_suit.mdl"
"mins" "-16 -16 0"
"maxs" "16 16 16"
"inv_carry" "1"
}

192
decls/def/player.def Normal file
View file

@ -0,0 +1,192 @@
entityDef player
{
"spawnclass" "TFPlayer"
}
entityDef player_shared
{
"inherit" "player"
"item" "item_suit"
}
entityDef player_scout
{
"inherit" "player_shared"
"model" "models/player/scout/scout.mdl"
"health" "75"
"armor" "25"
"maxarmor" "50"
"pm_walkspeed" "400" // 450 in QWTF
"ammo_shells" "17"
"ammo_nails" "100"
"max_ammo_shells" "50"
"max_ammo_nails" "200"
"max_ammo_cells" "100"
"max_ammo_rockets" "25"
"weapon" "tf_weapon_axe,tf_weapon_shotgun,tf_weapon_ng"
"current_weapon" "1"
}
entityDef player_sniper
{
"inherit" "player_shared"
"model" "models/player/sniper/sniper.mdl"
"health" "90"
"armor" "0"
"maxarmor" "50"
"pm_walkspeed" "300"
"ammo_shells" "60"
"ammo_nails" "50"
"max_ammo_shells" "75"
"max_ammo_nails" "100"
"max_ammo_cells" "50"
"max_ammo_rockets" "25"
"weapon" "tf_weapon_axe,tf_weapon_sniperrifle,tf_weapon_autorifle,tf_weapon_ng"
"current_weapon" "1"
}
entityDef player_soldier
{
"inherit" "player_shared"
"model" "models/player/soldier/soldier.mdl"
"health" "100"
"armor" "100"
"maxarmor" "200"
"pm_walkspeed" "240"
"ammo_shells" "26"
"ammo_rockets" "6"
"max_ammo_shells" "100"
"max_ammo_nails" "100"
"max_ammo_cells" "50"
"max_ammo_rockets" "50"
"weapon" "tf_weapon_axe,tf_weapon_supershotgun,tf_weapon_shotgun,tf_weapon_rpg"
"current_weapon" "1"
}
entityDef player_demo
{
"inherit" "player_shared"
"model" "models/player/demo/demo.mdl"
"health" "90"
"armor" "50"
"maxarmor" "100"
"pm_walkspeed" "280"
"ammo_shells" "22"
"ammo_rockets" "14"
"max_ammo_shells" "75"
"max_ammo_nails" "50"
"max_ammo_cells" "50"
"max_ammo_rockets" "50"
"weapon" "tf_weapon_axe,tf_weapon_shotgun,tf_weapon_gl,tf_weapon_pl"
"current_weapon" "1"
}
entityDef player_medic
{
"inherit" "player_shared"
"model" "models/player/medic/medic.mdl"
"health" "90"
"armor" "50"
"maxarmor" "100"
"pm_walkspeed" "320"
"ammo_shells" "26"
"ammo_nails" "50"
"max_ammo_shells" "75"
"max_ammo_nails" "150"
"max_ammo_cells" "50"
"max_ammo_rockets" "25"
"weapon" "tf_weapon_medikit,tf_weapon_supershotgun,tf_weapon_shotgun,tf_weapon_superng"
"current_weapon" "1"
}
entityDef player_heavy
{
"inherit" "player_shared"
"model" "models/player/hvyweapon/hvyweapon.mdl"
"health" "100"
"armor" "150"
"maxarmor" "300"
"pm_walkspeed" "228"
"ammo_shells" "176"
"max_ammo_shells" "200"
"max_ammo_nails" "200"
"max_ammo_cells" "50"
"max_ammo_rockets" "25"
"weapon" "tf_weapon_axe,tf_weapon_supershotgun,tf_weapon_shotgun,tf_weapon_ac"
"current_weapon" "1"
}
entityDef player_pyro
{
"inherit" "player_shared"
"model" "models/player/pyro/pyro.mdl"
"health" "100"
"armor" "50"
"maxarmor" "150"
"pm_walkspeed" "300"
"ammo_shells" "12"
"ammo_cells" "120"
"ammo_rockets" "5"
"max_ammo_shells" "40"
"max_ammo_nails" "50"
"max_ammo_cells" "200"
"max_ammo_rockets" "60"
"weapon" "tf_weapon_axe,tf_weapon_shotgun,tf_weapon_flamethrower,tf_weapon_ic"
"current_weapon" "1"
}
entityDef player_spy
{
"inherit" "player_shared"
"model" "models/player/spy/spy.mdl"
"health" "90"
"armor" "25"
"maxarmor" "100"
"pm_walkspeed" "300"
"ammo_shells" "24"
"ammo_nails" "50"
"max_ammo_shells" "40"
"max_ammo_nails" "50"
"max_ammo_cells" "30"
"max_ammo_rockets" "15"
"weapon" "tf_weapon_knife,tf_weapon_tranq,tf_weapon_supershotgun,tf_weapon_ng"
"current_weapon" "1"
}
entityDef player_engineer
{
"inherit" "player_shared"
"model" "models/player/engineer/engineer.mdl"
"health" "80"
"armor" "25"
"maxarmor" "50"
"pm_walkspeed" "300"
"ammo_shells" "4"
"ammo_nails" "25"
"ammo_cells" "100"
"max_ammo_shells" "50"
"max_ammo_nails" "50"
"max_ammo_cells" "200"
"max_ammo_rockets" "30"
"weapon" "tf_weapon_spanner,tf_weapon_railgun,tf_weapon_supershotgun"
"current_weapon" "1"
}
entityDef player_civilian
{
"inherit" "player_shared"
"model" "models/player/civilian/civilian.mdl"
"health" "50"
"armor" "0"
"maxarmor" "0"
"pm_walkspeed" "300"
"ammo_shells" "0"
"ammo_nails" "0"
"ammo_cells" "0"
"max_ammo_shells" "0"
"max_ammo_nails" "0"
"max_ammo_cells" "0"
"max_ammo_rockets" "0"
"weapon" "tf_weapon_umbrella"
"current_weapon" "1"
}

19
decls/def/weapons.def Normal file
View file

@ -0,0 +1,19 @@
#include "weapons/ac.def"
#include "weapons/autorifle.def"
#include "weapons/axe.def"
#include "weapons/flamethrower.def"
#include "weapons/gl.def"
#include "weapons/ic.def"
#include "weapons/knife.def"
#include "weapons/medikit.def"
#include "weapons/ng.def"
#include "weapons/pl.def"
#include "weapons/railgun.def"
#include "weapons/rpg.def"
#include "weapons/shotgun.def"
#include "weapons/sniperrifle.def"
#include "weapons/spanner.def"
#include "weapons/superng.def"
#include "weapons/supershotgun.def"
#include "weapons/tranq.def"
#include "weapons/umbrella.def"

55
decls/def/weapons/ac.def Normal file
View file

@ -0,0 +1,55 @@
entityDef tf_weapon_ac
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Assualt Cannon"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/w_tfac.mdl"
"model_view" "models/v_tfac.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfAssaultCannon"
"inv_name" "Assualt Cannon"
"ammoType" "ammo_shells"
"ammoRequired" "1"
"ammoPerShot" "2"
"punchAngle" "-2 0 0"
"actLoop" "4"
"act_holster" "6"
"act_draw" "5"
"act_fireStart" "2"
"act_fireStop" "3"
"act_idle" "0,1"
"snd_fireStart" "Weapon_Minigun.WindUp"
"snd_fireLoop" "Weapon_Minigun.Fire"
"snd_fireEnd" "Weapon_Minigun.WindDown"
"snd_empty" "Weapon_Minigun.ClipEmpty"
// HLWeapon specific
"hudSlot" "4"
"hudSlotPos" "0"
"weight" "30"
}
entityDef projectile_tfAssaultCannon
{
"inherit" "projectile_bullet_base"
"damage" "skill:plr_ac"
"hitscans" "12"
"spread" "0.08716 0.08716"
}
entityDef fireInfo_tfAssaultCannon
{
"def_onFire" "projectile_tfAssaultCannon"
"fireRate" "0.1"
"punchAngle" "-2 0 0"
"model_flash" "sprites/muzzleflash2.spr"
}

View file

@ -0,0 +1,52 @@
entityDef tf_weapon_autorifle
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Automatic Rifle"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/w_9mmhandgun.mdl"
"model_view" "models/v_tfc_sniper.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfAutoRifle"
"inv_name" "Automatic Rifle"
"inv_ammo_shells" "75"
"ammoType" "ammo_shells"
"ammoRequired" "1"
"ammoPerShot" "1"
"punchAngle" "-2 0 0"
"act_fire" "6"
"act_holster" "8"
"act_draw" "7"
"act_idle" "5"
"snd_fire" "Weapon_SMG.Single"
"snd_empty" "Weapon_SMG.ClipEmpty"
// HLWeapon specific
"hudSlot" "2"
"hudSlotPos" "0"
"weight" "10"
}
entityDef projectile_tfAutoRifleBullet
{
"inherit" "projectile_bullet_base"
"damage" "skill:plr_autorifle"
"spread" "0.025 0.025"
}
entityDef fireInfo_tfAutoRifle
{
"def_onFire" "projectile_tfAutoRifleBullet"
"ammoType" "ammo_shells"
"fireRate" "0.085"
"punchAngle" "-2 0 0"
"model_flash" "sprites/muzzleflash1.spr"
}

49
decls/def/weapons/axe.def Normal file
View file

@ -0,0 +1,49 @@
entityDef tf_weapon_axe
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Crowbar (Axe)"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/w_crowbar.mdl"
"model_view" "models/v_tfc_crowbar.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_melee" "damage_tfAxe"
"melee_distance" "32"
"inv_name" "Crowbar (Axe)"
"ammoType" ""
"ammoRequired" "0"
"clipSize" "0"
"silent_fire" "1"
"meleeRateMiss" "0.5"
"meleeRateHit" "0.5"
"act_idle" "0"
"act_draw" "1"
"act_holster" "2"
"act_fireFailed" "4,5,7"
"act_fire" "3,6,8"
// HLWeapon specific
"hudSlot" "0"
"hudSlotPos" "0"
"weight" "0"
"crosshair" "none"
"ammoIcon" "none"
}
entityDef damage_tfAxe
{
"damage" "skill:plr_crowbar"
"gib" "1"
"snd_hit" "Weapon_Crowbar.HitWorld"
"snd_hitFlesh" "Weapon_Crowbar.HitFlesh"
"snd_miss" "Weapon_Crowbar.Miss"
}

View file

@ -0,0 +1,88 @@
entityDef tf_weapon_flamethrower
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Flamethrower"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_egon.mdl"
"model_view" "models/v_flame.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfFlameThrower"
"inv_name" "Flamethrower"
"ammoType" "ammo_cells"
"ammoRequired" "1"
"act_fire" "5,6,7,8"
"act_holster" "10"
"act_draw" "9"
"act_idle" "0,1"
"snd_fire" "Weapon_FlameThrower.Fire"
"snd_empty" "Weapon_Pistol.ClipEmpty"
// HLWeapon specific
"hudSlot" "3"
"hudSlotPos" "1"
"weight" "30"
}
entityDef fireInfo_tfFlameThrower
{
"def_onFire" "projectile_tfFire"
"ammoPerShot" "2"
"fireRate" ".2"
"punchAngle" "-2 0 0"
"act_fire" "5,6"
"model_flash" "sprites/muzzleflash2.spr"
}
entityDef projectile_tfFire
{
"spawnclass" "ncProjectile"
"model" "sprites/fthrow.spr"
"def_damage" "tfFireDirect"
"health" "0"
"velocity" "250"
"angular_velocity" "0 0 200"
"fuse" "10"
"detonate_on_fuse" "0"
"detonate_on_death" "1"
"detonate_on_world" "1"
"detonate_on_actor" "1"
"impact_damage_effect" "1"
"impact_gib" "1"
"thrust" "2000"
"thrust_start" "0.1"
"thrust_end" "2"
"light_color" "1 0.8 0.4"
"light_radius" "160"
"light_offset" "0 0 0"
}
entityDef damage_tfFireDirect
{
"damage" "skill:plr_flamethrower"
}
entityDef damage_tfFireAfterburn
{
"damage" "skill:plr_flamethrower_afterburn"
}
entityDef fireInfo_tfFlameThrower
{
"def_onFire" "projectile_tfFire"
"punchAngle" "-10 0 0"
"reloadTime" "0.6"
}

78
decls/def/weapons/gl.def Normal file
View file

@ -0,0 +1,78 @@
entityDef tf_weapon_gl
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Grenade Launcher"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_glauncher.mdl"
"model_view" "models/v_tfgl.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfGrenadeLauncher"
"inv_name" "Grenade Launcher"
"clipSize" "6"
"ammoType" "ammo_rockets"
"ammoRequired" "1"
"ammoPerShot" "1"
"punchAngle" "-2 0 0"
"act_fire" "2"
"act_holster" "10"
"act_reloadStart" "4"
"act_reload" "4"
"act_reloadEnd" "5"
"act_draw" "8"
"act_idle" "0"
"snd_fire" "Weapon_GrenadeLauncher.Single"
"snd_empty" "Weapon_Pistol.ClipEmpty"
// HLWeapon specific
"hudSlot" "3"
"hudSlotPos" "0"
"weight" "10"
}
entityDef fireInfo_tfGrenadeLauncher
{
"def_onFire" "projectile_tfPipebomb"
"fireRate" "0.8"
"punchAngle" "-4 0 0"
}
entityDef projectile_tfPipebomb
{
"spawnclass" "ncProjectile"
"model" "models/pipebomb.mdl"
"skin" "1"
"frame" "1"
"fuse" "4"
"detonate_on_fuse" "1"
"bounce" "1"
"angular_velocity" "-350 0 0"
"velocity" "300 0 40"
"model_detonate" "fx_explosion.main"
"snd_explode" "Weapon_Grenade_Pipebomb.Explode"
"snd_bounce" "Weapon_Grenade_Pipebomb.Bounce"
"decal_detonate" "ExplosionScorch"
"smoke_fly" "weapon_rpg.trail"
"def_damage" "damage_tfPipebombDirect"
"def_splash_damage" "damage_tfPipebombSplash"
}
entityDef damage_tfPipebombDirect
{
"damage" "skill:plr_pipebomb"
}
entityDef damage_tfPipebombSplash
{
"damage" "skill:plr_pipebomb_splash"
"radius" "250"
}

95
decls/def/weapons/ic.def Normal file
View file

@ -0,0 +1,95 @@
entityDef tf_weapon_ic
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Incendiary Cannon"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/w_9mmhandgun.mdl"
"model_view" "models/v_tfc_rpg.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfIncendiaryCannon"
"inv_name" "Incendiary Cannon"
"ammoType" "ammo_rockets"
"ammoRequired" "1" // 3 in Quake Team Fortress
"ammoPerShot" "1"
"punchAngle" "-4 0 0"
"act_idle" "0,1"
"act_idleEmpty" "10,11"
"act_draw" "4"
"act_drawEmpty" "6"
"act_holster" "3"
"act_holsterEmpty" "5"
"act_reloadStart" "7"
"act_reload" "8"
"act_reloadEnd" "9"
"act_fire" "2"
"snd_fire" "Weapon_FlameThrower.FireRocket"
"snd_empty" "Weapon_Pistol.ClipEmpty"
// HLWeapon specific
"hudSlot" "4"
"hudSlotPos" "0"
"weight" "20"
}
entityDef projectile_tfIncendiaryRocket
{
"spawnclass" "ncProjectile"
"model" "models/rpgrocket.mdl"
"def_damage" "damage_tfIncendiaryRocketDirect"
"def_splash_damage" "damage_tfIncendiaryRocketSplash"
"health" "0"
"velocity" "250"
"angular_velocity" "0 0 200"
"fuse" "10"
"detonate_on_fuse" "0"
"detonate_on_death" "1"
"detonate_on_world" "1"
"detonate_on_actor" "1"
"impact_damage_effect" "1"
"impact_gib" "1"
"thrust" "2000"
"thrust_start" "0.1"
"thrust_end" "2"
"smoke_fly" "weapon_rpg.trail"
"decal_detonate" "ExplosionScorch"
"model_detonate" "fx_explosion.main"
"light_color" "1 0.8 0.4"
"light_radius" "160"
"light_offset" "0 0 0"
"explode_light_color" "2 1.6 0.8"
"explode_light_radius" "320"
"explode_light_fadetime" "0.5"
"snd_explode" "fx.explosion"
}
entityDef damage_tfIncendiaryRocketDirect
{
"damage" "skill:plr_incendiarylauncher"
}
entityDef damage_tfIncendiaryRocketSplash
{
"damage" "skill:plr_incendiarylauncher_splash"
"radius" "250"
}
entityDef fireInfo_tfIncendiaryCannon
{
"def_onFire" "projectile_tfIncendiaryRocket"
"punchAngle" "-10 0 0"
}

View file

@ -0,0 +1,50 @@
entityDef tf_weapon_knife
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Knife"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_knife.mdl"
"model_view" "models/v_tfc_knife.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_melee" "damage_tfKnife"
"melee_distance" "32"
"inv_name" "Knife"
"ammoType" ""
"ammoRequired" "0"
"clipSize" "0"
"silent_fire" "1"
"meleeRateMiss" "0.35"
"meleeRateHit" "0.35"
"act_idle" "0,1"
"act_draw" "4"
"act_holster" "5"
"act_fireFailed" "2"
"act_fire" "3"
// HLWeapon specific
"hudSlot" "0"
"hudSlotPos" "0"
"weight" "0"
"crosshair" "none"
"ammoIcon" "none"
}
}
entityDef damage_tfKnife
{
"damage" "skill:plr_knife"
"gib" "1"
"snd_hit" "Weapon_Knife.HitWorld"
"snd_hitFlesh" "Weapon_Knife.HitFlesh"
"snd_miss" "Weapon_Knife.Miss"
}

View file

@ -0,0 +1,68 @@
entityDef tf_weapon_medikit
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Medkit"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_medkit.mdl"
"model_view" "models/v_tfc_medkit.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_melee" "damage_tfMedikit"
"melee_distance" "32"
"inv_name" "Medikit"
"ammoType" ""
"ammoRequired" "0"
"clipSize" "0"
"silent_fire" "1"
"meleeRateMiss" "0.35"
"meleeRateHit" "0.35"
"act_idle" "0,1"
"act_draw" "5"
"act_holster" "4"
"act_fireFailed" "3"
"act_fire" "2"
// HLWeapon specific
"hudSlot" "0"
"hudSlotPos" "0"
"weight" "30"
"crosshair" "none"
"ammoIcon" "none"
}
//TODO
// Does initial damage then triggers tfInfection
entityDef damage_tfBioweapon
{
"damage" "skill:plr_bioweapon"
"snd_hitFlesh" "Weapon_Bioweapon.HitFlesh"
}
// Damages every couple seconds until death or heal
// Spreads to other players (except medic)
entityDef damage_tfBioweaponInfection
{
"damage" "skill:plr_bioweapon_infection"
}
// Initial heal will always fully heal player
entityDef damage_tfMedikit
{
"snd_hitFlesh" "Weapon_Medikit.HitFlesh"
}
// Overheal applys heal every attack, maxes at 50+
entityDef damage_tfMedikitOverheal
{
"damage" "skill:plr_medikit_overheal"
"snd_hitFlesh" "Weapon_Medikit.Overheal"
}

70
decls/def/weapons/ng.def Normal file
View file

@ -0,0 +1,70 @@
entityDef tf_weapon_ng
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Nail Gun"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_nailgun2.mdl"
"model_view" "models/v_tfc_nailgun.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfNailGun"
"inv_name" "Nail Gun"
"inv_ammo_nails" "25"
"ammoType" "ammo_nails"
"ammoRequired" "1"
"ammoPerShot" "1"
"act_idle" "0,1"
"act_draw" "4"
"act_fire" "5,6,7"
"snd_fire" "Weapon_NailGun.Single"
"snd_empty" "Weapon_NailGun.ClipEmpty"
// HLWeapon specific
"hudSlot" "3"
"hudSlotPos" "0"
"weight" "20"
}
entityDef debris_tfNail
{
"spawnclass" "ncProjectile"
"model" "models/nail.mdl"
}
entityDef projectile_tfNail
{
"spawnclass" "ncProjectile"
"model" "models/nail.mdl"
"velocity" "1000 0 0"
"angular_velocity" "0 0 20"
"mins" "0 0 0"
"maxs" "0 0 0"
"damage" "skill:plr_nail"
"snd_explode" "impact.tfNail"
"snd_hit" "impact.tfNailHitFlesh"
"detonate_on_fuse" "0"
"detonate_on_death" "1"
"detonate_on_world" "1"
"detonate_on_actor" "1"
"projectile_debris" "debris_tfNail"
"model_detonate" "impact_default.main"
"decal_detonate" "Impact.Shot"
"debris_count" "1"
"debris_stick" "1"
"debris_offset" "-2 0 0"
"offset" "0 3 -6"
}
entityDef fireInfo_tfNailGun
{
"def_onFire" "projectile_tfNail"
"fireRate" "0.1"
"punchAngle" "-4 0 0"
"model_flash" "sprites/muzzleflash2.spr"
}

75
decls/def/weapons/pl.def Normal file
View file

@ -0,0 +1,75 @@
entityDef tf_weapon_pl
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Sticky Launcher"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_glauncher.mdl"
"model_view" "models/v_tfgl.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfStickyLauncher"
"detonateOnFire" "projectile_tfStickybomb"
"inv_name" "Sticky Launcher"
"clipSize" "6"
"ammoType" "ammo_rockets"
"ammoRequired" "1"
"ammoPerShot" "1"
"punchAngle" "-2 0 0"
"act_fire" "3"
"act_holster" "11"
"act_reloadStart" "6"
"act_reload" "6"
"act_reloadEnd" "7"
"act_draw" "9"
"act_idle" "1"
"snd_fire" "Weapon_StickyBombLauncher.Single"
"snd_empty" "Weapon_Pistol.ClipEmpty"
// HLWeapon specific
"hudSlot" "4"
"hudSlotPos" "0"
"weight" "10"
}
entityDef fireInfo_tfStickyLauncher
{
"def_onFire" "projectile_tfStickybomb"
"fireRate" "0.8"
"punchAngle" "-4 0 0"
}
entityDef projectile_tfStickybomb
{
"spawnclass" "ncProjectile"
"model" "models/pipebomb.mdl"
"frame" "1"
"bounce" "1"
"angular_velocity" "-350 0 0"
"velocity" "300 0 40"
"model_detonate" "fx_explosion.main"
"snd_explode" "Weapon_Grenade_Pipebomb.Explode"
"snd_bounce" "Weapon_Grenade_Pipebomb.Bounce"
"decal_detonate" "ExplosionScorch"
"def_damage" "damage_tfStickybombDirect"
"def_splash_damage" "damage_tfStickybombSplash"
}
entityDef damage_tfStickybombDirect
{
"damage" "skill:plr_stickybomb"
}
entityDef damage_tfStickybombSplash
{
"damage" "skill:plr_stickybomb_splash"
"radius" "250"
}

View file

@ -0,0 +1,138 @@
entityDef tf_weapon_railgun
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "RailGun"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_9mmhandgun.mdl"
"model_view" "models/v_tfc_railgun.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfRailGun"
// "def_altFireInfo" "fireInfo_tfRailGunCharge" // Fortress Forever style charge attack
"inv_name" "RailGun"
"ammoType" "ammo_nails"
"ammoRequired" "1"
"ammoPerShot" "1"
"punchAngle" "-2 0 0"
"act_fire" "1"
// "actAltFire" "1"
"act_holster" "3"
"act_draw" "2"
"act_idle" "0"
"snd_fire" "Weapon_Railgun.Single"
"snd_altfire" "Weapon_Railgun.WindUp"
"snd_empty" "Weapon_Pistol.ClipEmpty"
// HLWeapon specific
"hudSlot" "1"
"hudSlotPos" "0"
"weight" "10"
}
entityDef projectile_tfRailShot
{
"spawnclass" "ncProjectile"
"model" ""
"def_damage" "damage_tfRailDirect"
"health" "0"
"velocity" "250"
"angular_velocity" "0 0 200"
"fuse" "10"
"detonate_on_fuse" "0"
"detonate_on_death" "1"
"detonate_on_world" "1"
"detonate_on_actor" "1"
"impact_damage_effect" "1"
"impact_gib" "1"
"thrust" "2000"
"thrust_start" "0.1"
"thrust_end" "2"
"smoke_fly" "weapon_railgun.trail"
"decal_detonate" "Impact.BigShot"
"model_detonate" "fx_spark.main"
"snd_explode" "fx.spark
"light_color" "0 0.5 0"
"light_radius" "160"
"light_offset" "0 0 0"
}
entityDef projectile_tfRailChargedShot
{
"spawnclass" "ncProjectile"
"model" ""
"def_damage" "damage_tfRailChargeDirect"
"def_splash_damage" "damage_tfTailChargedSplash"
"health" "0"
"velocity" "250"
"angular_velocity" "0 0 200"
"fuse" "10"
"detonate_on_fuse" "0"
"detonate_on_death" "1"
"detonate_on_world" "1"
"detonate_on_actor" "1"
"impact_damage_effect" "1"
"impact_gib" "1"
"thrust" "2000"
"thrust_start" "0.1"
"thrust_end" "2"
"smoke_fly" "weapon_railgun.trail"
"decal_detonate" "ExplosionScorch"
"model_detonate" "fx_explosion.main"
"light_color" "0 0.5 0"
"light_radius" "160"
"light_offset" "0 0 0"
"explode_light_color" "2 1.6 0.8"
"explode_light_radius" "320"
"explode_light_fadetime" "0.5"
"snd_explode" "fx.explosion"
}
entityDef damage_tfRailDirect
{
"damage" "skill:plr_railgun"
}
entityDef damage_tfRailChargeDirect
{
"damage" "skill:plr_railgun_charge"
}
entityDef damage_tfTailChargedSplash
{
"damage" "skill:plr_railgun_charge_splash"
"radius" "250"
}
entityDef fireInfo_tfRailGun
{
"def_onFire" "projectile_tfRailShot"
"ammoPerShot" "1"
"fireRate" "0.4"
"punchAngle" "-2 0 0"
}
entityDef fireInfo_tfRailGunCharge
{
"def_onFire" "projectile_tfRailChargedShot"
"ammoPerShot" "1"
"fireRate" "0.75"
"punchAngle" "-10 0 0"
}

95
decls/def/weapons/rpg.def Normal file
View file

@ -0,0 +1,95 @@
entityDef tf_weapon_rpg
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Rocket Launcher"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/w_rpg.mdl"
"model_view" "models/v_tfc_rpg.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
"def_fireInfo" "fireInfo_tfRPG"
"ammoType" "ammo_rockets"
"clipSize" "4"
"ammoRequired" "1"
"ammoPerShot" "1"
"inv_ammo_rockets" "1"
"fireRate" "2.5"
"act_idle" "0,1"
"act_idleEmpty" "10,11"
"act_draw" "4"
"act_drawEmpty" "6"
"act_holster" "3"
"act_holsterEmpty" "5"
"act_reloadStart" "7"
"act_reload" "8"
"act_reloadEnd" "9"
"act_fire" "2"
"snd_fire" "Weapon_RPG.Single"
"snd_empty" "Weapon_Pistol.ClipEmpty"
// HLWeapon specific
"hudSlot" "3"
"hudSlotPos" "0"
"weight" "20"
}
entityDef projectile_tfRocket
{
"spawnclass" "ncProjectile"
"model" "models/rpgrocket.mdl"
"def_damage" "damage_tfRocketDirect"
"def_splash_damage" "damage_tfRocketSplash"
"health" "0"
"velocity" "250"
"angular_velocity" "0 0 200"
"fuse" "10"
"detonate_on_fuse" "0"
"detonate_on_death" "1"
"detonate_on_world" "1"
"detonate_on_actor" "1"
"impact_damage_effect" "1"
"impact_gib" "1"
"thrust" "2000"
"thrust_start" "0.1"
"thrust_end" "2"
"smoke_fly" "weapon_rpg.trail"
"decal_detonate" "ExplosionScorch"
"model_detonate" "fx_explosion.main"
"light_color" "1 0.8 0.4"
"light_radius" "160"
"light_offset" "0 0 0"
"explode_light_color" "2 1.6 0.8"
"explode_light_radius" "320"
"explode_light_fadetime" "0.5"
"snd_explode" "fx.explosion"
}
entityDef damage_tfRocketDirect
{
"damage" "skill:plr_rpg"
}
entityDef damage_tfRocketSplash
{
"damage" "skill:plr_rpg_splash"
"radius" "250"
}
entityDef fireInfo_tfRPG
{
"def_onFire" "projectile_tfRocket"
"punchAngle" "-10 0 0"
"reloadTime" "0.6"
}

View file

@ -0,0 +1,62 @@
entityDef tf_weapon_shotgun
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Single-Barrel Shotgun"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_shotgun.mdl"
"model_view" "models/v_tfc_12gauge.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfShotgun"
"inv_name" "Single-Barrel Shotgun"
"inv_ammo_shells" "4"
"ammoType" "ammo_shells"
"ammoRequired" "1"
"clipSize" "8"
"act_fire" "1"
"act_holster" "7"
"act_reloadStart" "5"
"act_reload" "3"
"act_reloadEnd" "4"
"act_draw" "6"
"act_idle" "0,8,9"
//TODO Fast Reload
"snd_fire" "Weapon_Shotgun.Single"
"snd_empty" "Weapon_Shotgun.Empty"
"snd_reload" "Weapon_Shotgun.Reload"
"snd_reload_end" "Weapon_Shotgun.Pump"
// HLWeapon specific
"hudSlot" "1"
"hudSlotPos" "0"
"weight" "10"
}
// TODO Damage should be 4-24
entityDef projectile_tfShotgun
{
"inherit" "projectile_bullet_base"
"damage" "skill:plr_shotgun"
"hitscans" "12"
"spread" "0.08716 0.08716"
}
entityDef fireInfo_tfShotgun
{
"def_onFire" "projectile_tfShotgun"
"ammoPerShot" "1"
"fireRate" "0.5"
"punchAngle" "-2 0 0"
"model_flash" "sprites/muzzleflash2.spr"
"reloadTime" "0.2"
}

View file

@ -0,0 +1,59 @@
entityDef tf_weapon_sniperrifle
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Sniper Rifle"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_sniper2.mdl"
"model_view" "models/v_tfc_sniper.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfSniperRifle"
"inv_name" "Sniper Rifle"
"inv_ammo_shells" "75"
"ammoType" "ammo_shells"
"ammoRequired" "1"
"ammoPerShot" "1"
"punchAngle" "-2 0 0"
"act_fire" "6"
"act_holster" "8"
"act_draw" "7"
"act_idle" "5"
"snd_fire" "Weapon_SniperRifle.Single"
"snd_empty" "Weapon_SniperRifle.ClipEmpty"
// HLWeapon specific
"hudSlot" "1"
"hudSlotPos" "0"
"weight" "20"
"zoomDuration" "0"
"zoomFov" "20"
"zoomFovStep" "5"
"zoomFovMin" "5"
"zoomFovMax" "40"
}
entityDef projectile_tfSniperRifleBullet
{
"inherit" "projectile_bullet_base"
"damage" "skill:plr_sniperrifle"
"spread" "0.025 0.025"
}
entityDef fireInfo_tfSniperRifle
{
"def_onFire" "projectile_tfSniperRifleBullet"
"ammoType" "ammo_shells"
"fireRate" "0.75"
"punchAngle" "-2 0 0"
"model_flash" "sprites/muzzleflash1.spr"
}

View file

@ -0,0 +1,46 @@
entityDef tf_weapon_spanner
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Wrench"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_spanner.mdl"
"model_view" "models/v_tfc_spanner.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_melee" "damage_tfWrench"
"melee_distance" "32"
"inv_name" "Wrench"
"ammoType" "ammo_cells"
"ammoRequired" "0"
"ammoPerShot" "0"
"punchAngle" "0 0 0"
"silent_fire" "1"
"act_idle" "0"
"act_draw" "4"
"act_holster" "5"
"act_fireFailed" "1,2"
"act_fire" "3"
// HLWeapon specific
"hudSlot" "0"
"hudSlotPos" "0"
"weight" "0"
"crosshair" "none"
"ammoIcon" "none"
}
entityDef damage_tfWrench
{
"damage" "skill:plr_spanner"
"snd_hit" "Weapon_Wrench.HitWorld"
"snd_hitFlesh" "Weapon_Wrench.HitFlesh"
"snd_miss" "Weapon_Wrench.Miss"
}

View file

@ -0,0 +1,64 @@
entityDef tf_weapon_superng
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Super Nail Gun"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_snailgun2.mdl"
"model_view" "models/v_tfc_supernailgun.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfSuperNailGun"
"inv_name" "Super Nail Gun"
"inv_ammo_nails" "50"
"ammoType" "ammo_nails"
"ammoRequired" "1"
"act_idle" "0,1"
"act_draw" "4"
"act_fire" "5,6,7"
"snd_fire" "Weapon_SyringeGun.Single"
"snd_empty" "Weapon_SyringeGun.ClipEmpty"
// HLWeapon specific
"hudSlot" "3"
"hudSlotPos" "0"
"weight" "20"
}
entityDef projectile_tfSuperNail
{
"spawnclass" "ncProjectile"
"model" "models/nail.mdl"
"velocity" "1000 0 0"
"angular_velocity" "0 0 20"
"mins" "0 0 0"
"maxs" "0 0 0"
"damage" "skill:plr_nail_super"
"snd_explode" "impact.tfNail"
"snd_hit" "impact.tfNailHitFlesh"
"detonate_on_fuse" "0"
"detonate_on_death" "1"
"detonate_on_world" "1"
"detonate_on_actor" "1"
"projectile_debris" "debris_tfNail"
"model_detonate" "impact_default.main"
"decal_detonate" "ExplosionScorch"
"debris_count" "1"
"debris_stick" "1"
"debris_offset" "-2 0 0"
}
entityDef fireInfo_tfSuperNailGun
{
"def_onFire" "projectile_tfSuperNail"
"ammoPerShot" "1"
"fireRate" "0.1"
"punchAngle" "-4 0 0"
"model_flash" "sprites/muzzleflash2.spr"
}

View file

@ -0,0 +1,61 @@
entityDef tf_weapon_supershotgun
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Double-Barrel Shotgun"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/w_shotgun.mdl"
"model_view" "models/v_tfc_shotgun.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfSuperShotgun"
"inv_name" "Double-Barrel Shotgun"
"inv_ammo_shells" "4"
"ammoType" "ammo_shells"
"ammoRequired" "2"
"clipSize" "16"
"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_SuperShotgun.Single"
"snd_empty" "Weapon_Shotgun.Empty"
"snd_reload" "Weapon_Shotgun.Reload"
"snd_reload_end" "Weapon_Shotgun.Pump"
// HLWeapon specific
"hudSlot" "2"
"hudSlotPos" "1"
"weight" "20"
}
// TODO Damage should be 4-56
entityDef projectile_tfSuperShotgun
{
"inherit" "projectile_bullet_base"
"damage" "skill:plr_shotgun_super"
"hitscans" "12"
"spread" "0.08716 0.08716"
}
entityDef fireInfo_tfSuperShotgun
{
"def_onFire" "projectile_tfSuperShotgun"
"ammoPerShot" "2"
"fireRate" "0.7"
"punchAngle" "-4 0 0"
"model_flash" "sprites/muzzleflash2.spr"
"reloadTime" "0.4"
}

View file

@ -0,0 +1,71 @@
entityDef tf_weapon_tranq
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Tranquilizer Gun"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/w_9mmhandgun.mdl"
"model_view" "models/v_tfc_pistol.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_fireInfo" "fireInfo_tfTranq"
"inv_name" "Tranquilizer Gun"
"ammoType" "ammo_shells"
"ammoRequired" "1"
"ammoPerShot" "1"
"punchAngle" "-2 0 0"
"act_fire" "3"
"actAltFire" "3"
"act_fireLast" "4"
"actAltFireLast" "4"
"act_holster" "8"
"act_reload" "6"
"act_reloadEmpty" "5"
"act_draw" "7"
"act_idle" "0,1,2"
"view_geomset" "geomset 2 2\n"
"snd_fire" "Weapon_Tranq.Single"
"snd_empty" "Weapon_Tranq.ClipEmpty"
// HLWeapon specific
"hudSlot" "1"
"hudSlotPos" "0"
"weight" "10"
}
entityDef fireInfo_tfTranq
{
"def_onFire" "projectile_tfTranq"
"fireRate" "2.0"
"punchAngle" "-4 0 0"
}
entityDef projectile_tfTranq
{
"spawnclass" "ncProjectile"
"model" "models/nail.mdl"
"velocity" "1000 0 0"
"angular_velocity" "0 0 20"
"mins" "0 0 0"
"maxs" "0 0 0"
"damage" "skill:plr_tranq"
"snd_explode" "impact.tfNail"
"snd_hit" "impact.tfNailHitFlesh"
"detonate_on_fuse" "0"
"detonate_on_death" "1"
"detonate_on_world" "1"
"detonate_on_actor" "1"
"projectile_debris" "debris_tfNail"
"model_detonate" "impact_default.main"
"decal_detonate" "ExplosionScorch"
"debris_count" "1"
"debris_stick" "1"
"debris_offset" "-2 0 0"
}

View file

@ -0,0 +1,49 @@
entityDef tf_weapon_umbrella
{
"editor_color" ".3 .3 1"
"editor_mins" "-16 -16 -16"
"editor_maxs" "16 16 16"
"editor_usage" "Umbrella"
"editor_rotatable" "1"
"spawnclass" "HLWeapon"
"model" "models/p_umbrella.mdl"
"model_view" "models/v_umbrella.mdl"
"snd_acquire" "weapon.pickup"
"snd_respawn" "item.respawn"
// weapon specific
"def_melee" "damage_tfUmbrella"
"melee_distance" "32"
"inv_name" "Umbrella"
"ammoType" ""
"ammoRequired" "0"
"clipSize" "0"
"silent_fire" "1"
"meleeRateMiss" "0.5"
"meleeRateHit" "0.5"
"act_idle" "0"
"act_draw" "1"
"act_holster" "2"
"act_fireFailed" "4,5,7"
"act_fire" "3,6,8"
// HLWeapon specific
"hudSlot" "0"
"hudSlotPos" "0"
"weight" "0"
"crosshair" "none"
"ammoIcon" "none"
}
entityDef damage_tfUmbrella
{
"damage" "skill:plr_umbrella"
"gib" "1"
"snd_hit" "Weapon_Umbrella.HitWorld"
"snd_hitFlesh" "Weapon_Umbrella.HitFlesh"
"snd_miss" "Weapon_Umbrella.Miss"
}

View file

@ -0,0 +1,238 @@
Weapon_Bioweapon.HitFlesh
{
pitch 0.75
sample items/medshot4.wav
}
Weapon_Crowbar.HitWorld
{
alerts
sample weapons/cbar_hit1.wav
sample weapons/cbar_hit2.wav
}
Weapon_Crowbar.HitFlesh
{
alerts
sample weapons/cbar_hitbod1.wav
sample weapons/cbar_hitbod2.wav
sample weapons/cbar_hitbod3.wav
}
Weapon_Crowbar.Miss
{
sample weapons/cbar_miss1.wav
}
Weapon_FlameThrower.Fire
{
sample weapons/flmfire2.wav
}
Weapon_FlameThrower.FireRocket
{
sample weapons/sgun1.wav
}
Weapon_Grenade_Pipebomb.Bounce
{
sample weapons/grenade_hit1.wav
sample weapons/grenade_hit2.wav
sample weapons/grenade_hit3.wav
}
Weapon_Grenade_Pipebomb.Explode
{
sample weapons/explode3.wav
sample weapons/explode4.wav
sample weapons/explode5.wav
}
Weapon_GrenadeLauncher.Single
{
sample weapons/glauncher.wav
}
Weapon_Knife.HitWorld
{
alerts
sample weapons/cbar_hit1.wav
sample weapons/cbar_hit2.wav
}
Weapon_Knife.HitFlesh
{
alerts
sample weapons/cbar_hitbod1.wav
sample weapons/cbar_hitbod2.wav
sample weapons/cbar_hitbod3.wav
}
Weapon_Knife.Miss
{
sample weapons/cbar_miss1.wav
}
Weapon_Medikit.HitFlesh
{
sample items/medshot4.wav
}
Weapon_Minigun.Fire
{
alerts
pitch 0.75
sample weapons/asscan2.wav
}
Weapon_Minigun.ClipEmpty
{
sample weapons/dryfire1.wav
}
Weapon_Minigun.WindDown
{
alerts
sample weapons/asscan3.wav
}
Weapon_Minigun.WindUp
{
alerts
sample weapons/asscan1.wav
}
Weapon_Medikit.Overheal
{
pitch 1.5
sample items/smallmedkit1.wav
}
Weapon_Medikit.HitFlesh
{
sample items/smallmedkit1.wav
}
Weapon_NailGun.Single
{
sample weapons/airgun_1.wav
}
Weapon_NailGun.ClipEmpty
{
sample weapons/dryfire1.wav
}
Weapon_RPG.Single
{
sample weapons/rocketfire1.wav
}
Weapon_Pistol.ClipEmpty
{
sample weapons/dryfire1.wav
}
Weapon_Railgun.Single
{
sample weapons/railgun.wav
}
Weapon_Railgun.WindUp
{
pitch 0.5
sample weapons/railgun.wav
}
Weapon_Shotgun.Single
{
sample weapons/sbarrel1.wav
}
Weapon_SuperShotgun.Single
{
sample weapons/shotgn2.wav
}
Weapon_Shotgun.Pump
{
sample weapons/scock1.wav
}
Weapon_Shotgun.Reload
{
sample weapons/reload3.wav
}
Weapon_SMG.Single
{
sample weapons/sniper.wav
}
Weapon_SMG.ClipEmpty
{
sample weapons/dryfire1.wav
}
Weapon_SniperRifle.Single
{
sample ambience/rifle1.wav
}
Weapon_SniperRifle.ClipEmpty
{
sample weapons/dryfire1.wav
}
Weapon_StickyBombLauncher.Single
{
sample weapons/glauncher2.wav
}
Weapon_SyringeGun.Single
{
sample weapons/spike2.wav
}
Weapon_SyringeGun.ClipEmpty
{
sample weapons/dryfire1.wav
}
Weapon_Tranq.Single
{
sample weapons/dartgun.wav
}
Weapon_Tranq.ClipEmpty
{
sample weapons/dryfire1.wav
}
Weapon_Wrench.HitFlesh
{
sample weapons/cbar_hitbod1.wav
sample weapons/cbar_hitbod2.wav
sample weapons/cbar_hitbod3.wav
}
Weapon_Wrench.HitWorld
{
sample weapons/cbar_hit1.wav
sample weapons/cbar_hit2.wav
}
Weapon_Wrench.Miss
{
sample weapons/cbar_miss1.wav
}
engineer.build
{
sample weapons/building.wav
}
engineer.turret_set
{
sample weapons/turrset.wav
}

3
default_tfc.cfg Normal file
View file

@ -0,0 +1,3 @@
set "hostname" "Team Effort Server"
set "maxplayers" "8"
set g_gametype "default"

BIN
icon.tga Normal file

Binary file not shown.

BIN
img/te.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -1,2 +0,0 @@
In order to play this FreeHL addon, please move the folder this file is
in into the same place where 'valve' and 'default.fmf' reside. Thanks!

View file

@ -1,14 +0,0 @@
FTEMANIFEST 1
GAME tfc
NAME "Team Fortress"
BASEGAME platform
BASEGAME valve
BASEGAME tfc
// you don't really want to change these
RTCBROKER master.frag-net.com:27950
PROTOCOLNAME "Nuclide"
MAINCONFIG game.cfg
DOWNLOADSURL "http://www.frag-net.com/dl/packages"
-exec platform_default.cfg

BIN
maps/2fort.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

BIN
maps/avanti.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

BIN
maps/badlands.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View file

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

BIN
maps/casbah.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

BIN
maps/crossover2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

BIN
maps/cz2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

BIN
maps/dustbowl.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

BIN
maps/epicenter.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

BIN
maps/flagrun.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

BIN
maps/hunted.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

BIN
maps/push.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

BIN
maps/rock2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

BIN
maps/warpath.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

BIN
maps/well.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

View file

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

5
quake.rc Normal file
View file

@ -0,0 +1,5 @@
exec default_controls.cfg
exec default_cvar.cfg
exec default_video.cfg
exec default_valve.cfg
exec default_tfc.cfg

View file

@ -3,3 +3,4 @@ CC=fteqcc
all:
cd client && $(MAKE)
cd server && $(MAKE)
cd rules && $(MAKE)

View file

@ -1,4 +1,4 @@
CC=fteqcc
QCC=fteqcc
all:
$(CC) progs.src
$(QCC) $(CFLAGS) -I../../../src/platform/ -I../../../valve/src/shared/ progs.src

View file

@ -14,11 +14,14 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
void VGUI_ChooseClass(void);
void VGUI_ChooseClass(int);
int
bool
ClientGame_ConsoleCommand(void)
{
int s = (int)getproperty(VF_ACTIVESEAT);
pSeatTFC = &g_seats_tfc[s];
switch(argv(0)) {
case "build":
sendevent("TFCBuild", "i", stoi(argv(1)));
@ -28,27 +31,42 @@ ClientGame_ConsoleCommand(void)
break;
case "chooseclass":
case "changeclass":
VGUI_ChooseClass();
VGUI_ChooseClass(userinfo.GetInteger(pSeat->m_ePlayer, "*team"));
break;
case "chooseteam":
case "changeteam":
VGUI_ChooseTeam();
break;
case "+gren1":
pSeat->m_iInputExtra1 = TRUE;
pSeatTFC->m_bInputGren1 = true;
break;
case "-gren1":
pSeat->m_iInputExtra1 = FALSE;
pSeatTFC->m_bInputGren1 = false;
break;
case "+gren2":
pSeat->m_iInputExtra2 = TRUE;
pSeatTFC->m_bInputGren2 = true;
break;
case "-gren2":
pSeat->m_iInputExtra2 = FALSE;
pSeatTFC->m_bInputGren2 = false;
break;
/* stubbed out, so they won't get forwarded to Nuclide */
case "goprone":
case "gocrouch":
case "+prone":
case "-prone":
case "+gostand":
case "-gostand":
case "+sprint":
case "-sprint":
break;
case "invnext":
pSeatLocal->weaponSelectionHUD.SelectNext(false);
break;
case "invprev":
pSeatLocal->weaponSelectionHUD.SelectPrevious(false);
break;
default:
return (0);
return (false);
}
return (1);
return (true);
}

View file

@ -15,6 +15,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "../../../valve/src/shared/defs.h"
#define MAX_A_CELLS 200
var string g_dmsg_spr;
@ -28,5 +29,10 @@ var string g_tfchud7_spr;
var int MUZZLE_ROUND;
void TFCHallucination_Insert(vector, vector);
void TFCHallucination_Insert(vector, vector);
struct
{
bool m_bInputGren1;
bool m_bInputGren2;
} g_seats_tfc[4], *pSeatTFC;

View file

@ -42,7 +42,7 @@ ClientGame_PreDraw(void)
void
ClientGame_PostDraw(void)
{
player pl = (player)pSeat->m_ePlayer;
TFPlayer pl = (TFPlayer)pSeat->m_ePlayer;
if (serverkeyfloat("areadefs") == 1) {
string strArea = getplayerkeyvalue(player_localnum, "*areadef");

View file

@ -18,6 +18,12 @@ int
ClientGame_EntityUpdate(float id, float new)
{
switch (id) {
case ENT_PLAYER:
NSENTITY_READENTITY(TFPlayer, new)
break;
case ENT_WEAPON:
NSENTITY_READENTITY(HLWeapon, new)
break;
default:
return (0);
}

View file

@ -24,20 +24,6 @@ ClientGame_EventParse(float fHeader)
case EV_OBITUARY:
Obituary_Parse();
break;
case EV_BLOOD:
vector vBloodPos;
vector vBloodColor;
vBloodPos[0] = readcoord();
vBloodPos[1] = readcoord();
vBloodPos[2] = readcoord();
vBloodColor[0] = readbyte() / 255;
vBloodColor[1] = readbyte() / 255;
vBloodColor[2] = readbyte() / 255;
FX_Blood(vBloodPos, vBloodColor);
break;
case EV_CHAT:
float fSender = readbyte();
float fTeam = readbyte();
@ -55,15 +41,6 @@ ClientGame_EventParse(float fHeader)
case EV_VIEWMODEL:
View_PlayAnimation(readbyte());
break;
case EV_WEAPON_PICKUP:
int w = readbyte();
if (autocvar_cl_autoweaponswitch == 1) {
sendevent("PlayerSwitchWeapon", "i", w);
}
HUD_WeaponPickupNotify(w);
break;
default:
return (0);
}

View file

@ -1,5 +1,5 @@
class
TFCHallucination:NSEntity
TFCHallucination:ncEntity
{
};
@ -28,7 +28,8 @@ TFCHallucination_Insert(vector viewPosition, vector viewDirection)
halluPos += v_forward * random(8, 64);
halluPos += v_up * random(-64, 64);
halluPos += v_right * random(-64, 64);
FX_Blood(halluPos, [1,0,0]);
#warning FIX THE BLOOD CALL!
//FX_Blood(halluPos, [1,0,0]);
}
pointsound(viewPosition, "weapons/cbar_hitbod1.wav", 1, ATTN_NORM);
break;
@ -67,7 +68,7 @@ TFCHallucination_Insert(vector viewPosition, vector viewDirection)
break;
case 7: /* nade thrown about */
int nadeSelection = (int)floor(random(0, 8));
NSRenderableEntity eNade = spawn(NSRenderableEntity);
ncRenderableEntity eNade = spawn(ncRenderableEntity);
switch (nadeSelection) {
case 1:
@ -107,7 +108,7 @@ TFCHallucination_Insert(vector viewPosition, vector viewDirection)
break;
case 8: /* nail shot around */
halluPos = viewPosition + (v_forward * -32) + (v_right * random(-64, 64));
NSRenderableEntity eNail = spawn(NSRenderableEntity);
ncRenderableEntity eNail = spawn(ncRenderableEntity);
eNail.SetModel("models/nail.mdl");
eNail.SetOrigin(halluPos);
eNail.SetMovetype(MOVETYPE_NOCLIP);

View file

@ -76,10 +76,10 @@ HUD_AmmoNotify_Insert(int type, int count)
/* called whenever we should check for pickup updates */
void
HUD_AmmoNotify_Check(player pl)
HUD_AmmoNotify_Check(ncPlayer pl)
{
HUD_AmmoNotify_Insert(0, pl.m_iAmmoRockets - pl.m_iAmmoRockets_net);
HUD_AmmoNotify_Insert(1, pl.m_iAmmoNails - pl.m_iAmmoNails_net);
HUD_AmmoNotify_Insert(2, pl.m_iAmmoCells - pl.m_iAmmoCells_net);
HUD_AmmoNotify_Insert(3, pl.m_iAmmoShells - pl.m_iAmmoShells_net);
}
HUD_AmmoNotify_Insert(0, pl.m_iAmmoTypes[1] - pl.m_iAmmoTypes_net[1]);
HUD_AmmoNotify_Insert(1, pl.m_iAmmoTypes[2] - pl.m_iAmmoTypes_net[2]);
HUD_AmmoNotify_Insert(2, pl.m_iAmmoTypes[3] - pl.m_iAmmoTypes_net[3]);
HUD_AmmoNotify_Insert(3, pl.m_iAmmoTypes[4] - pl.m_iAmmoTypes_net[4]);
}

View file

@ -76,7 +76,7 @@ HUD_ItemNotify_Insert(int type, int count)
/* called whenever we should check for pickup updates */
void
HUD_ItemNotify_Check(player pl)
HUD_ItemNotify_Check(ncPlayer pl)
{
int healthdiff = bound(0, pl.health - pl.health_net, 100);
int armordiff = bound(0, pl.armor - pl.armor_net, 100);

View file

@ -30,11 +30,19 @@ ClientGame_Init(float apilevel, string enginename, float engineversion)
registercommand("-gren1");
registercommand("+gren2");
registercommand("-gren2");
registercommand("chooseclass");
registercommand("changeclass");
registercommand("chooseteam");
registercommand("changeteam");
registercommand("chooseteam");
registercommand("lastinv");
registercommand("invnext");
registercommand("invprev");
Obituary_Init();
pSeatTFC = &g_seats_tfc[0];
pSeatLocal->weaponSelectionHUD = spawn(HLWeaponSelect);
}
void VGUI_ChooseTeam(void);
@ -50,8 +58,6 @@ ClientGame_RendererRestart(string rstr)
Obituary_Precache();
Damage_Precache();
FX_Blood_Init();
/* HUD selection icons */
g_dmsg_spr = spriteframe("sprites/tfc_dmsg.spr", 0, 0.0f);
g_tfchud1_spr = spriteframe("sprites/tfchud01.spr", 0, 0.0f);
@ -67,4 +73,5 @@ ClientGame_RendererRestart(string rstr)
MUZZLE_SMALL = (int)getmodelindex("sprites/muzzleflash2.spr");
MUZZLE_WEIRD = (int)getmodelindex("sprites/muzzleflash3.spr");
MUZZLE_ROUND = (int)getmodelindex("sprites/muzzleflash.spr");
HLSprite_Init();
}

View file

@ -1,6 +1,7 @@
#pragma target fte_5768
//#pragma flag enable assumeint
#pragma progs_dat "../../csprogs.dat"
#pragma forcecrc 54730
#define CSQC
#define CLIENT
@ -20,8 +21,6 @@ defs.h
../../../src/gs-entbase/shared.src
../shared/include.src
vox.qc
../../../valve/src/client/damage.qc
draw.qc
init.qc
@ -38,11 +37,13 @@ hud_itemnotify.qc
hud_ammonotify.qc
../../../valve/src/client/hud_sprite.qc
../../../valve/src/client/hud.qc
../../../valve/src/client/HLWeaponSelect.qc
../../../valve/src/client/hud_weaponselect.qc
../../../valve/src/client/scoreboard.qc
../../../src/client/include.src
vgui_chooseteam.qc
vgui_changeclass.qc
../../../valve/src/client/vgui_chooseteam.qc
../../../valve/src/client/vgui_changeclass.qc
../../../src/shared/include.src
#endlist

View file

@ -1,232 +0,0 @@
/*
* 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.
*/
static string g_classDescrScout;
static string g_classDescrSniper;
static string g_classDescrSoldier;
static string g_classDescrDemoman;
static string g_classDescrMedic;
static string g_classDescrHWGuy;
static string g_classDescrPyro;
static string g_classDescrSpy;
static string g_classDescrEngineer;
static string g_classDescrRandomPC;
static void
TFCClass_Init(void)
{
g_classDescrScout = textfile_to_string("classes/short_scout.txt");
g_classDescrSniper = textfile_to_string("classes/short_sniper.txt");
g_classDescrSoldier = textfile_to_string("classes/short_soldier.txt");
g_classDescrDemoman = textfile_to_string("classes/short_demoman.txt");
g_classDescrMedic = textfile_to_string("classes/short_medic.txt");
g_classDescrHWGuy = textfile_to_string("classes/short_hwguy.txt");
g_classDescrPyro = textfile_to_string("classes/short_pyro.txt");
g_classDescrSpy = textfile_to_string("classes/short_spy.txt");
g_classDescrEngineer = textfile_to_string("classes/short_engineer.txt");
g_classDescrRandomPC = textfile_to_string("classes/short_randompc.txt");
}
static VGUIWindow winClassSelection;
static VGUIPic imgClassPreview;
static VGUILabel lblClassTitle;
static VGUILabel lblClassDescription;
static VGUILabel lblClassCounter;
class TFClassButton:VGUIButton
{
void TFClassButton(void);
virtual void OnMouseUp(void);
virtual void OnMouseEntered(void);
};
void
TFClassButton::TFClassButton(void)
{
}
void
TFClassButton::OnMouseUp(void)
{
int classSelection = GetTag();
sendevent("ClassJoin", "f", (float)classSelection);
winClassSelection.Hide();
}
void
TFClassButton::OnMouseEntered(void)
{
int classSelection = GetTag();
string teamName = "blue";
switch (getplayerkeyfloat(player_localnum, "*team")) {
case 1:
teamName = "blue";
break;
case 2:
teamName = "red";
break;
case 3:
teamName = "blue"; /* TFC doesn't ship with a real green. */
break;
case 4:
teamName = "red"; /* TFC doesn't ship with a real yellow either. */
break;
}
switch (classSelection) {
case 1:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_scout"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_scout", teamName));
lblClassDescription.SetTitle(g_classDescrScout);
break;
case 2:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_sniper"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_sniper", teamName));
lblClassDescription.SetTitle(g_classDescrSniper);
break;
case 3:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_soldier"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_soldier", teamName));
lblClassDescription.SetTitle(g_classDescrSoldier);
break;
case 4:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_demoman"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_demoman", teamName));
lblClassDescription.SetTitle(g_classDescrDemoman);
break;
case 5:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_medic"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_medic", teamName));
lblClassDescription.SetTitle(g_classDescrMedic);
break;
case 6:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_hwguy"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_hwguy", teamName));
lblClassDescription.SetTitle(g_classDescrHWGuy);
break;
case 7:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_pyro"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_pyro", teamName));
lblClassDescription.SetTitle(g_classDescrPyro);
break;
case 8:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_spy"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_spy", teamName));
lblClassDescription.SetTitle(g_classDescrSpy);
break;
case 9:
lblClassTitle.SetTitle(Titles_GetTextBody("Title_engineer"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_engineer", teamName));
lblClassDescription.SetTitle(g_classDescrEngineer);
break;
case 0:
lblClassTitle.SetTitle(Titles_GetTextBody("RandomPC"));
imgClassPreview.SetImage(strcat("gfx/vgui/640_randompc", teamName));
lblClassDescription.SetTitle(g_classDescrRandomPC);
break;
}
}
string g_classnames [] = {
"Scout",
"Sniper",
"Soldier",
"Demoman",
"Medic",
"HWGuy",
"Pyro",
"Spy",
"Engineer",
"Random"
};
void
VGUI_ChooseClass(void)
{
static int initialized;
static TFClassButton *btns;
static VGUILabel lblSelectClass;
static VGUIFrame frmClassInfo;
if (!initialized) {
vector btnpos = [40,80];
initialized = TRUE;
TFCClass_Init();
winClassSelection = spawn(VGUIWindow);
winClassSelection.SetSize([640, 480]);
winClassSelection.SetStyleMask(VGUIWindowBorderless | VGUIWindowFullscreen);
lblSelectClass = spawn(VGUILabel);
lblSelectClass.SetTitle(Titles_GetTextBody("Title_SelectYourClass"));
lblSelectClass.SetTextSize(19);
lblSelectClass.SetPos([40, 38]);
lblSelectClass.SetSize([400, 24]);
frmClassInfo = spawn(VGUIFrame);
frmClassInfo.SetPos([176, 80]);
frmClassInfo.SetSize([424, 312]);
imgClassPreview = spawn(VGUIPic);
imgClassPreview.SetPos([190, 90]);
lblClassTitle = spawn(VGUILabel);
lblClassTitle.SetPos([338, 90]);
lblClassTitle.SetTextSize(19);
lblClassTitle.SetSize([320, 24]);
lblClassCounter = spawn(VGUILabel);
lblClassCounter.SetPos([338, 90 + 32]);
lblClassCounter.SetSize([320, 18]);
lblClassDescription = spawn(VGUILabel);
lblClassDescription.SetPos([338, 90 + 32 + 32]);
lblClassDescription.SetSize([250, 240]);
g_uiDesktop.Add(winClassSelection);
winClassSelection.Add(lblSelectClass);
winClassSelection.Add(frmClassInfo);
winClassSelection.Add(imgClassPreview);
winClassSelection.Add(lblClassTitle);
winClassSelection.Add(lblClassCounter);
winClassSelection.Add(lblClassDescription);
btns = memalloc(sizeof(TFClassButton) * g_classnames.length);
for (int i = 0; i < g_classnames.length; i++) {
btns[i] = spawn(TFClassButton);
btns[i].SetTitle(Titles_GetTextBody(g_classnames[i]));
btns[i].SetSize([124, 24]);
btns[i].SetPos(btnpos);
if (i == 9) {
btns[i].SetKeyEquivalent("0");
btns[i].SetTag(0);
} else {
btns[i].SetKeyEquivalent(ftos((float)i+1));
btns[i].SetTag(i+1i);
}
winClassSelection.Add(btns[i]);
btnpos[1] += 32;
}
}
winClassSelection.Show();
winClassSelection.SetPos((video_res / 2) - (winClassSelection.GetSize() / 2));
}

View file

@ -1,159 +0,0 @@
/*
* 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.
*/
static VGUIWindow winChooseTeam;
class TFTeamButton:VGUIButton
{
void TFTeamButton(void);
virtual void OnMouseUp(void);
};
void
TFTeamButton::TFTeamButton(void)
{
}
void
TFTeamButton::OnMouseUp(void)
{
int tag = GetTag();
localcmd("changeclass\n");
sendevent("TeamJoin", "f", (float)tag);
winChooseTeam.Hide();
}
string
VGUI_ChooseTeam_MapInfo(void)
{
static string mapinfo = __NULL__;
if (mapinfo != __NULL__)
return mapinfo;
filestream fileMap = fopen(strcat("maps/", mapname, ".txt"), FILE_READ);
string temp;
if (fileMap != -1) {
while ((temp = fgets(fileMap))) {
mapinfo = strcat(mapinfo, temp, "\n");
}
} else {
mapinfo = Titles_GetTextBody("Map_Description_not_available");
}
return mapinfo;
}
void
VGUI_ChooseTeam(void)
{
static int initialized;
static VGUIButton btnAutoAssign;
static VGUIButton btnGoSpectator;
static VGUIFrame frmMapInfo;
static VGUILabel lblSelectTeam;
static VGUILabel lblMapName;
static VGUILabel lblMapInfo;
if (!initialized) {
vector btnpos = [40,80];
initialized = TRUE;
winChooseTeam = spawn(VGUIWindow);
winChooseTeam.SetSize('640 480');
winChooseTeam.SetStyleMask(VGUIWindowBorderless | VGUIWindowFullscreen);
lblSelectTeam = spawn(VGUILabel);
lblSelectTeam.SetTitle(Titles_GetTextBody("Title_SelectYourTeam"));
lblSelectTeam.SetTextSize(19);
lblSelectTeam.SetPos([40, 38]);
lblSelectTeam.SetSize('400 24');
frmMapInfo = spawn(VGUIFrame);
frmMapInfo.SetPos('176 80');
frmMapInfo.SetSize('424 312');
lblMapName = spawn(VGUILabel);
lblMapName.SetTitle(mapname);
lblMapName.SetTextSize(19);
lblMapName.SetPos('194 105');
lblMapName.SetSize('250 312');
lblMapInfo = spawn(VGUILabel);
lblMapInfo.SetTitle(VGUI_ChooseTeam_MapInfo());
lblMapInfo.SetPos('194 129');
lblMapInfo.SetSize('375 250');
for (int t = 1; t <= serverkeyfloat("teams"); t++) {
TFTeamButton btnForTeam;
string team_name = serverkey(sprintf("team_%i", t));
btnForTeam = spawn(TFTeamButton);
btnForTeam.SetTitle(strtoupper(team_name));
btnForTeam.SetPos(btnpos);
btnForTeam.SetKeyEquivalent(ftos((float)t));
btnForTeam.SetSize('124 24');
switch (team_name) {
case "Blue":
btnForTeam.SetTag(1);
break;
case "Red":
btnForTeam.SetTag(2);
break;
case "Green":
btnForTeam.SetTag(3);
break;
case "Yellow":
btnForTeam.SetTag(4);
break;
}
winChooseTeam.Add(btnForTeam);
btnpos[1] += 32;
}
btnAutoAssign = spawn(VGUIButton);
btnAutoAssign.SetTitle(Titles_GetTextBody("Team_AutoAssign"));
btnAutoAssign.SetPos(btnpos);
btnAutoAssign.SetSize('124 24');
btnAutoAssign.SetKeyEquivalent("5");
//btnAutoAssign.SetFunc(VGUI_AutoAssign);
btnpos[1] += 32;
btnGoSpectator = spawn(VGUIButton);
btnGoSpectator.SetTitle(Titles_GetTextBody("Menu_Spectate"));
btnGoSpectator.SetPos(btnpos);
btnGoSpectator.SetSize('124 24');
btnGoSpectator.SetKeyEquivalent("6");
//btnGoSpectator.SetFunc(VGUI_GoSpectator);
g_uiDesktop.Add(winChooseTeam);
winChooseTeam.Add(frmMapInfo);
winChooseTeam.Add(lblSelectTeam);
winChooseTeam.Add(lblMapName);
winChooseTeam.Add(lblMapInfo);
winChooseTeam.Add(btnAutoAssign);
winChooseTeam.Add(btnGoSpectator);
}
winChooseTeam.Show();
winChooseTeam.SetPos((video_res / 2) - (winChooseTeam.GetSize() / 2));
}

64
src/files.dat Normal file
View file

@ -0,0 +1,64 @@
63
1 cfg/skill.cfg
1 cfg/skill_manifest.cfg
1 data/avanti.way
1 data/badlands.way
1 data/casbah.way
1 data/crossover2.way
1 data/cz2.way
1 data/dustbowl.way
1 data/epicenter.way
1 data/flagrun.way
1 data/hunted.way
1 data/push.way
1 data/rock2.way
1 data/warpath.way
1 data/well.way
1 decls/def/ammo.def
1 decls/def/armor.def
1 decls/def/items.def
1 decls/def/monsters.def
1 decls/def/player.def
1 decls/def/weapons.def
1 decls/def/weapons/ac.def
1 decls/def/weapons/autorifle.def
1 decls/def/weapons/axe.def
1 decls/def/weapons/flamethrower.def
1 decls/def/weapons/gl.def
1 decls/def/weapons/ic.def
1 decls/def/weapons/knife.def
1 decls/def/weapons/medikit.def
1 decls/def/weapons/ng.def
1 decls/def/weapons/pl.def
1 decls/def/weapons/railgun.def
1 decls/def/weapons/rpg.def
1 decls/def/weapons/shotgun.def
1 decls/def/weapons/sniperrifle.def
1 decls/def/weapons/spanner.def
1 decls/def/weapons/superng.def
1 decls/def/weapons/supershotgun.def
1 decls/def/weapons/tranq.def
1 decls/def/weapons/umbrella.def
1 decls/sound/items_tfc.sndshd
1 decls/sound/player_tfc.sndshd
1 decls/sound/turret_tfc.sndshd
1 decls/sound/weapons_tfc.sndshd
1 default_tfc.cfg
1 maps/2fort.jpg
1 maps/avanti.jpg
1 maps/badlands.jpg
1 maps/casbah.jpg
1 maps/crossover2.jpg
1 maps/cz2.jpg
1 maps/dustbowl.jpg
1 maps/epicenter.jpg
1 maps/flagrun.jpg
1 maps/hunted.jpg
1 maps/push.jpg
1 maps/rock2.jpg
1 maps/warpath.jpg
1 maps/well.jpg
1 particles/weapon_railgun.cfg
1 progs/default.dat
1 quake.rc
1 scripts/constants.txt

Some files were not shown because too many files have changed in this diff Show more