Skip to content

Commit

Permalink
Merge pull request #611 from FortressOne/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
drzel authored Apr 11, 2021
2 parents 0fb1cfd + 6f6e458 commit 8cba5e7
Show file tree
Hide file tree
Showing 37 changed files with 681 additions and 221 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ FortressOne Server

New features
------
* Option to configure hwguy armor `localinfo max_armor_hwguy 250`.
* ``setinfo keepcells <number>`` allows scout/med/pyro/eng/hwguy to include cells above ``<number>`` into discards. eg. an eng with 200 cells that has ``setinfo keepcells 50`` will discard 150 cells and keep 50. sold/spy/sniper/demo will throw all cells regardless of ``<number>`` (current behaviour). suggest players using this setinfo use scout/med/pyro/eng/hwguy class configs to set values for each class. ``localinfo nokeepcells 1`` - disables keepcells server-wide
* option to let engineer move while building `localinfo em on`.
* new brush ent ``trigger_jumper`` - an alias for ``trigger_push`` with spawnflags 16 - retains your x/y velocity, only boosting your z by the .speed value.
* new csqc command ``fo_menu_vote`` shows the list of maps available to vote.
Expand Down Expand Up @@ -55,6 +57,8 @@ New features
* Admin system created to allow for easy setup of pub/clan/quad/duel games, kick players etc `localinfo adminpwd <password>` and `cmd adminpwd <password>; wait; adminmenu`
* Loc support added to server, show locations for dropped flag.
* Nailgrenades changed to "Shock/Laser Grenades" to lower spam/not stop bunnyhopping on hit (0 original, 1 laser, 2 burst). `localinfo nailgren_type 1` and `nginfo` in game for all configurable settings.
* Option for "blast medic". Secondary grenade is repaced with blast gren. It behaves like a concussion grenade, but doesn't apply a concussion effect. The blast medic moves at 280 units (instead of 320), but is not speed capped. `localinfo medic_type 1` (0 for normal, 1 for blast).
* Blast grenade velocity multiplier `localinfo blastgren_velocity_multiplier`. (default 1 is same as concussion grenade).
* Option for hitsounds (1 - enemies only, 2 - enemies and teammates). `setinfo hitsound 2`
* Option for medic to be immune from concussion effects. `localinfo medicnocuss on`.
* Option to adjust concussion grenade effect time in seconds. `localinfo cussgrentime n`.
Expand All @@ -63,7 +67,7 @@ New features
* Keys and flags glow their colour.
* Option to adjust conussion grenade effect time in seconds. `localinfo cussgrentime`.
* Option to fully restock player on cap. `localinfo stock_on_cap on`.
* Option for packs to fully restock health and armour of player. `localinfo stockfull on`.
* Option for packs to fully restock health and armor of player. `localinfo stockfull on`.
* Automatic server-side mvd recording of clan matches. Requires `localinfo serverdemo on`.
* Map vote (4 random maps + current map) during last few minutes of game (shown for newly spawned or toggled with /togglevote).
* Force early map vote using /votenext, /votetrick (trick maps) and /voterace (race maps).
Expand All @@ -75,7 +79,7 @@ New features
* Grenade slot switching (/grenswitch).
* Prime/throw grenades with one button (/gren1 and /gren2).
* Weapon slots (1-4) where 1 is always primary and 4 is always melee.
* Quick attack aliases (+slot1-4).
* Quick attack aliases (+quick1-4 will switch weapon and fire. +slot1-4 will do the same and switch back).
* Next/previous weapon (/weapprev and /weapnext).
* Last weapon (/weaplast).
* Remember current weapon and last weapon after dying.
Expand All @@ -93,7 +97,7 @@ New features
* Pyro types - `localinfo pyro_type val` - 0 = original tf2.9, 1 = oztf pyro style, 2 = FO pyro style
* localinfo server_sbflaginfo : 0 - disables sbar flaginfo, 1 enables it [default: 1]
* localinfo reverse_cap : 0 - normal gameplay, 1: you have to take your flag and capture in the enemy base [default: 0]
* localinfo engineer_move / em : 0 - normal gameplay, 1: engineers can move while building [default: 0]
* localinfo engineer_move / em : 0 - normal gameplay, 1: engineers can move while building [default: 1]
* localinfo round_delay_time : interval time between rounds in quadmode - seconds [default: 30]
* localinfo max_gren2_soldier : maximum number of active nail/shock grenades (TF 2.8 = 3, OzTF = 1) [default: 3]

Expand Down
2 changes: 1 addition & 1 deletion csqc/csdefs.qc
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ const float HASH_REPLACE = 256; /* Used with hash_add. Attempts to remove the ol
const float STAT_HEALTH = 0;
const float STAT_WEAPON = 2;
const float STAT_AMMO = 3;
const float STAT_ARMOUR = 4;
const float STAT_ARMOR = 4;
const float STAT_WEAPONFRAME = 5;
const float STAT_SHELLS = 6;
const float STAT_NAILS = 7;
Expand Down
5 changes: 1 addition & 4 deletions csqc/events.qc
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,7 @@ void() CSQC_Parse_Event = {
FO_Menu_Class(2);
break;
case CLIENT_MENU_DROPAMMO:
float ammotypes = readfloat();
float ammomakes = readfloat();

FO_Menu_DropAmmo(FALSE, ammotypes, ammomakes);
FO_Menu_DropAmmo(FALSE);
break;
case CLIENT_MENU_SCOUT:
float scanner_on = readbyte();
Expand Down
5 changes: 3 additions & 2 deletions csqc/hud.qc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ void FO_Hud_Editor_LoadDefaultSettings()
Hud_Panels[HUD_PANEL_PLAYERCLASS].Position = [0, 180];
Hud_Panels[HUD_PANEL_SHOWSCORES].Position = [(width / 2) - (Hud_Panels[HUD_PANEL_SHOWSCORES].FillSize.x / 2), 30];
Hud_Panels[HUD_PANEL_SHOWSCORES].Scale = 1.00;
Hud_Panels[HUD_PANEL_TEAM_SCORE].Position = [(width - Hud_Panels[HUD_PANEL_TEAM_SCORE].FillSize.x), 0];
Hud_Panels[HUD_PANEL_MAP_MENU].Position = [(width / 2) - (Hud_Panels[HUD_PANEL_MAP_MENU].FillSize.x / 2), 30];
Hud_Panels[HUD_PANEL_MAP_MENU].Scale = 1.00;
}
Expand Down Expand Up @@ -533,8 +534,9 @@ void(string panelid) Hud_DrawTeamScorePanel = {
FO_Hud_Panel* panel = getHudPanelPointer(id);

vector position = getPosition(id);

vector size = getFillSize(id);
float textScale = panel.TextScale?panel.TextScale:panel.Scale;
float textScale = panel.TextScale ? panel.TextScale : panel.Scale;
float sizex, sizey;
sizex = size_x;
sizey = size_y;
Expand All @@ -550,7 +552,6 @@ void(string panelid) Hud_DrawTeamScorePanel = {
// click event
if (fo_hud_editor)
{

}
}

Expand Down
83 changes: 56 additions & 27 deletions csqc/menu.qc
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ var fo_menu FO_MENU_BUILD = {
FO_MENU_BUILD.options[3].state = FO_MENU_STATE_HIDDEN; //Dismantle
}
} else {
if(getstatf(STAT_CELLS) > ENG_SENTRY_COST) {
if(getstatf(STAT_CELLS) >= ENG_SENTRY_COST) {
FO_MENU_BUILD.options[0].state = FO_MENU_STATE_NORMAL;
} else {
FO_MENU_BUILD.options[0].state = FO_MENU_STATE_DISABLED;
Expand All @@ -302,7 +302,7 @@ var fo_menu FO_MENU_BUILD = {
FO_MENU_BUILD.options[5].state = FO_MENU_STATE_HIDDEN;
}
} else {
if(getstatf(STAT_CELLS) > ENG_DISPENSER_COST) {
if(getstatf(STAT_CELLS) >= ENG_DISPENSER_COST) {
FO_MENU_BUILD.options[1].state = FO_MENU_STATE_NORMAL;
} else {
FO_MENU_BUILD.options[1].state = FO_MENU_STATE_DISABLED;
Expand Down Expand Up @@ -346,7 +346,7 @@ var fo_menu FO_MENU_SENTRY_ROTATE = {
var fo_menu FO_MENU_DISPENSER_MAINTAIN = {
[0,0], [300,200], "Dispenser", FO_MENU_FLAG_CENTER | FO_MENU_FLAG_SHOW_SHORTCUTS, {
{"1","Insert Ammo","","",FO_MENU_STATE_NORMAL,{localcmd("cmd dispenser ammo\n");Menu_Cancel();},MENU_BUTTON},
{"2","Insert Armour","","",FO_MENU_STATE_NORMAL,{localcmd("cmd dispenser armour\n");Menu_Cancel();},MENU_BUTTON},
{"2","Insert Armor","","",FO_MENU_STATE_NORMAL,{localcmd("cmd dispenser armor\n");Menu_Cancel();},MENU_BUTTON},
{"3","Repair","","",FO_MENU_STATE_NORMAL,{localcmd("cmd dispenser repair\n");Menu_Cancel();},MENU_BUTTON},
MenuSpacer,
{"5","Nothing","","",FO_MENU_STATE_NORMAL,{Menu_Cancel();},MENU_BUTTON},
Expand All @@ -361,7 +361,7 @@ var fo_menu FO_MENU_DISPENSER_MAINTAIN = {
var fo_menu FO_MENU_DISPENSER_USE = {
[0,0], [300,200], "Use Dispenser", FO_MENU_FLAG_CENTER | FO_MENU_FLAG_SHOW_SHORTCUTS, {
{"1","Withdraw Ammo","","",FO_MENU_STATE_NORMAL,{localcmd("cmd dispenser withdraw ammo\n");Menu_Cancel();},MENU_BUTTON},
{"2","Withdraw Armour","","",FO_MENU_STATE_NORMAL,{localcmd("cmd dispenser withdraw armour\n");Menu_Cancel();},MENU_BUTTON},
{"2","Withdraw Armor","","",FO_MENU_STATE_NORMAL,{localcmd("cmd dispenser withdraw armor\n");Menu_Cancel();},MENU_BUTTON},
MenuSpacer,
{"5","Nothing","","",FO_MENU_STATE_NORMAL,{Menu_Cancel();},MENU_BUTTON},
}, 4, TRUE, {
Expand Down Expand Up @@ -942,39 +942,68 @@ void FO_Menu_Class(float force) = {
fo_hud_menu_active = TRUE;
}

void FO_Menu_DropAmmo(float force, float ammotypes, float ammomakes) {
void FO_Menu_DropAmmo(float force) {
if(fo_hud_menu_active && CurrentMenu == &FO_MENU_DROPAMMO) {
Menu_Cancel();
return;
}
if(fo_hud_menu_active && !force)
return;
if(!ammotypes) {
Menu_Cancel();

float available = 0;
FO_MENU_DROPAMMO.options[0].value = "";
if(getstatf(STAT_SHELLS) < DROP_SHELLS) {
FO_MENU_DROPAMMO.options[0].state = FO_MENU_STATE_DISABLED;
} else {
FO_MENU_DROPAMMO.options[0].state = FO_MENU_STATE_NORMAL;
available++;
}
FO_MENU_DROPAMMO.options[1].value = "";
if(getstatf(STAT_NAILS) < DROP_NAILS) {
FO_MENU_DROPAMMO.options[1].state = FO_MENU_STATE_DISABLED;
} else {
FO_MENU_DROPAMMO.options[1].state = FO_MENU_STATE_NORMAL;
available++;
}
FO_MENU_DROPAMMO.options[2].value = "";
if(getstatf(STAT_ROCKETS) < DROP_ROCKETS) {
FO_MENU_DROPAMMO.options[2].state = FO_MENU_STATE_DISABLED;
} else {
FO_MENU_DROPAMMO.options[2].state = FO_MENU_STATE_NORMAL;
available++;
}
FO_MENU_DROPAMMO.options[3].value = "";
if(getstatf(STAT_CELLS) < DROP_CELLS) {
FO_MENU_DROPAMMO.options[3].state = FO_MENU_STATE_DISABLED;
} else {
FO_MENU_DROPAMMO.options[3].state = FO_MENU_STATE_NORMAL;
available++;
}
if(!available) {
if(fo_hud_menu_active && CurrentMenu == &FO_MENU_DROPAMMO) {
Menu_Cancel();
} else {
print("Not enough ammo\n");
}
return;
}
if(ammomakes) {
if (player_class == PC_ENGINEER) {
FO_MENU_DROPAMMO.title = "Drop or Make Ammo";
if ((getstatf(STAT_SHELLS) < DROP_SHELLS) && ((getstatf(STAT_CELLS) / AMMO_COST_SHELLS) > (DROP_SHELLS - getstatf(STAT_SHELLS)))) {
FO_MENU_DROPAMMO.options[0].value = "(make)";
FO_MENU_DROPAMMO.options[0].state = FO_MENU_STATE_NORMAL;
}
if ((getstatf(STAT_NAILS) < DROP_NAILS) && ((getstatf(STAT_CELLS) / AMMO_COST_NAILS) > (DROP_NAILS - getstatf(STAT_NAILS)))) {
FO_MENU_DROPAMMO.options[1].value = "(make)";
FO_MENU_DROPAMMO.options[1].state = FO_MENU_STATE_NORMAL;
}
if ((getstatf(STAT_ROCKETS) < DROP_ROCKETS) && ((getstatf(STAT_CELLS) / AMMO_COST_ROCKETS) > (DROP_ROCKETS - getstatf(STAT_ROCKETS)))) {
FO_MENU_DROPAMMO.options[2].value = "(make)";
FO_MENU_DROPAMMO.options[2].state = FO_MENU_STATE_NORMAL;
}
} else {
FO_MENU_DROPAMMO.title = "Drop Ammo";
}
for(float i = 0; i < 4; i++) {
if(ammotypes & pow(2,i)) {
FO_MENU_DROPAMMO.options[i].state = FO_MENU_STATE_NORMAL;
} else {
if(ammomakes & pow(2,i)) {
FO_MENU_DROPAMMO.options[i].value = "(make)";
FO_MENU_DROPAMMO.options[i].state = FO_MENU_STATE_NORMAL;
} else {
FO_MENU_DROPAMMO.options[i].value = "";
FO_MENU_DROPAMMO.options[i].state = FO_MENU_STATE_DISABLED;
}
}
if(ammomakes & pow(2,i)) {
FO_MENU_DROPAMMO.options[i].value = "(make)";
} else {
FO_MENU_DROPAMMO.options[i].value = "";
}
}

CurrentMenu = &FO_MENU_DROPAMMO;
fo_hud_menu_active = TRUE;
Expand Down Expand Up @@ -1283,4 +1312,4 @@ void (float show) showVoteMenu = {
if(show) {
CurrentMenu = &FO_MENU_VOTE;
}
};
};
2 changes: 1 addition & 1 deletion csqc/status.qc
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ var FO_Hud_Panel Hud_Panels[] = {
{"gamemodepanel",FO_HUD_GAME_MODE_NAME,'100 140','100 10',1,0,1,0, drawGameModePanel, {return "";}},
{"readypanel",FO_HUD_READY_NAME,'10 100','100 10',2,0,1,FO_HUD_INSERT_MIDDLE, drawReadyPanel, {return SBAR.Hint;}},
{"showscorespanel",FO_HUD_SHOWSCORES_NAME,'10 100','600 200',1,0,0,FO_HUD_INSERT_MIDDLE, drawShowScoresPanel, {return "";}},
{"teamscorepanel",FO_HUD_TEAM_SCORE_NAME,'10 100','100 10',2,0,1,FO_HUD_INSERT_MIDDLE, drawTeamScorePanel, {return "";}},
{"teamscorepanel",FO_HUD_TEAM_SCORE_NAME,'0 0','72 12',2,0,1,FO_HUD_INSERT_AFTER, drawTeamScorePanel, {return "";}},
{"mapmenupanel",FO_HUD_MAP_MENU_NAME,'10 30','800 400',1,0,1,FO_HUD_INSERT_MIDDLE, drawMapMenuPanel, {return "";}},
{"hudoptionspanel",FO_HUD_OPTIONS_NAME,'10 10','150 150',1,0,1,0, doNothing, {return DrawPanel.id;}},
};
Expand Down
7 changes: 5 additions & 2 deletions docs/tfentref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ playerclass AP must be this playerclass to meet this Goal's criteria
9 : Only allow an Engineer to activate

spawnflags 1 : By default, when a GoalItem has a .mdl set, it will glow based on team_no.
This spawnflag will stop that glow.

This spawnflag will stop that glow. (TFGI_NOGLOW)
2 : Allow this goal to work even in clan battle/quadmode prematch (TFGI_CB_IGNORE)
if_goal_is_active This Goal must be in ACTIVE state.
if_goal_is_inactive This Goal must be in INACTIVE state.
if_goal_is_removed This Goal must be in REMOVED state.
Expand Down Expand Up @@ -1224,6 +1224,9 @@ trigger_push
4 : exclude "other" (So only TFItems are affected)
8 : "no noise" make sure no default noise is added

func_wall
spawnflags: 1 : make wall non solid
2 : WALL_HIDE_ON_USE
trigger_jumppad
Rename of trigger_push, can be used to allow for "Fortress One" only trigger_push entities that won't be misinterpreted by other fortress mods

Expand Down
10 changes: 5 additions & 5 deletions menu/options_keys.qc
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ const static struct
{0, 0},
{_(""), "Advanced Weaponry"},
{0, 0},
{_("Fire Primary"), "+fire1"},
{_("Fire Secondary"), "+fire2"},
{_("Fire Tertiary"), "+fire3"},
{_("Fire Melee"), "+fire4"},
{_("Fire Primary"), "+quick1"},
{_("Fire Secondary"), "+quick2"},
{_("Fire Tertiary"), "+quick3"},
{_("Fire Melee"), "+quick4"},
{_("Quick Primary"), "+slot1"},
{_("Quick Secondary"), "+slot2"},
{_("Quick Tertiary"), "+slot3"},
{_("Quick Melee"), "+slot4"},
{_("Quick Melee"), "+slot4"},
{_("Prime Grenade 1"), "primeone"},
{_("Prime Grenade 2"), "primetwo"},
{_("Throw Grenade"), "throwgren"},
Expand Down
36 changes: 33 additions & 3 deletions share/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
#define TFSTATE_CONCUSSED 524288

// Defines used by TF_T_Damage (see combat.qc)
#define TF_TD_IGNOREARMOUR 1 // Bypasses the armour of the target
#define TF_TD_IGNOREARMOR 1 // Bypasses the armor of the target
#define TF_TD_NOTTEAM 2 // Doesn't damage a team member (indicates direct fire weapon)
#define TF_TD_NOTSELF 4 // Doesn't damage self

Expand Down Expand Up @@ -765,6 +765,7 @@
#define GR_TYPE_EMP 8
#define GR_TYPE_FLASH 9
#define GR_TYPE_CALTROP 10
#define GR_TYPE_BLAST 11

// Defines for NailGren Types
#define NGR_TYPE_DEFAULT 0
Expand All @@ -781,6 +782,13 @@
#define NGR_BURST_DEFAULT_INTERVAL 0.7
#define NGR_BURST_DEFAULT_RANGE 0.3

// Defines for Medic type
#define MEDIC_TYPE_DEFAULT 0
#define MEDIC_TYPE_BLAST 1

// Defines for BlastGren Settings
#define BLASTGREN_DEFAULT_VELOCITY_MULTIPLIER 1

// Defines for WeaponMode
#define GL_NORMAL 0
#define GL_PIPEBOMB 1
Expand Down Expand Up @@ -954,6 +962,8 @@
#define PC_MEDIC_MAXHEALTH 100
#define PC_MEDIC_MAXSPEED 320
#define PC_MEDIC_MAXSTRAFESPEED 320
#define PC_BLASTMEDIC_MAXSPEED 280
#define PC_BLASTMEDIC_MAXSTRAFESPEED 280
#define PC_MEDIC_MAXARMOR 90
#define PC_MEDIC_INITARMOR 40
#define PC_MEDIC_MAXARMORTYPE 0.6
Expand All @@ -972,7 +982,7 @@
#define PC_MEDIC_INITAMMO_ROCKET 0
#define PC_MEDIC_INITAMMO_MEDIKIT 50
#define PC_MEDIC_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_MEDIC_GRENADE_TYPE_2 GR_TYPE_CONCUSSION
#define PC_MEDIC_GRENADE_TYPE_2 GR_TYPE_BLAST
#define PC_MEDIC_GRENADE_INIT_1 3
#define PC_MEDIC_GRENADE_INIT_2 2
#define PC_MEDIC_GRENADE_MAX_1 4
Expand Down Expand Up @@ -1207,6 +1217,9 @@
#define TFGI_KEEP 256 // Players keep this item even when they die
#define TFGI_ITEMGLOWS 512 // Item glows when on the ground
#define TFGI_DONTREMOVERES 1024 // Don't remove results when the item is removed
#define TFGI_DROPTOFLOOR 2048 // If this bit is set, the GoalItem drops to the ground when it first spawns.
#define TFGI_ALLOWTHROW 4096 // Item can be thrown with 'dropitems' command
#define TFGI_SOLID 8192 // Item is solid

// Defines for TeamSpawnpoints : goal_activation (in team spawns)
#define TFSP_MULTIPLEITEMS 1 // Give out the GoalItem multiple times
Expand Down Expand Up @@ -1236,6 +1249,7 @@

// spawnflags
#define TFGI_NOGLOW 1 // stop the automatic glow applied in fortressone to goals with a .mdl set based on team
#define TFGI_CB_IGNORE 2 // Allow this goal to work even in clan battle/quadmode prematch

/*======================================================================*/
/* Flamethrower */
Expand Down Expand Up @@ -1427,12 +1441,28 @@

// Dimensions
#define DMN_FLASH 1 // when flashed, we set dimension see to this
// all bits between 1 and 255 are reserved for flash
#define DMN_NOFLASH 256 // see all the things
#define DMN_TEAMBLUE 512
#define DMN_TEAMRED 1024
#define DMN_TEAMYELL 2048
#define DMN_TEAMGREN 4096
#define DMN_INVISIBLE 8192 // special dimension to hide stuff in

// trigger_push
#define PUSH_ONCE 1
#define PUSH_INCLUDETFITEM 2
#define PUSH_EXCLUDEOTHER 4 // bad names, bad bits, bad coder
#define PUSH_EXCLUDEOTHER 4 // bad names, bad bits, bad coder - use in conjunction with includetfitem to exclude all but tfitem
#define PUSH_NONOISE 8
#define PUSH_MEGAJUMPER 16
#define PUSH_EXCLUDEGRENADE 32

// func_wall
#define WALL_SOLID_NOT 1
#define WALL_HIDE_ON_USE 2

// teams
#define TEAM_BLUE 1
#define TEAM_RED 2
#define TEAM_YELL 3
#define TEAM_GREN 4
Loading

0 comments on commit 8cba5e7

Please sign in to comment.