Skip to content

Commit

Permalink
push to v0.19.50
Browse files Browse the repository at this point in the history
  • Loading branch information
themuffinator committed Sep 30, 2024
1 parent f6b6ace commit 548fa87
Show file tree
Hide file tree
Showing 22 changed files with 917 additions and 310 deletions.
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Muff Mode includes the game logic, a server config, bot files and some map entit
- Current weapon is now droppable
- Smart weapon auto-switch: now switches to SSG from SG, CG from MG, never auto-switches to chainfist.
- Instant gametype changing (eg: from FFA to TDM)
- DuelFire Damage has been changed to Haste: 50% faster movement, 50% faster weapon rate of fire.
- Many more!

## Rulesets
Expand Down Expand Up @@ -140,14 +141,20 @@ Use **[command] [arg]** for the below listed admin commands:
- **readyall**: force all players to ready status (during readying warmup status)
- **unreadyall**: force all players to NOT ready status (during readying warmup status)

### Client Commands
### Client Commands - Player Configuration
Use **[command] [arg]** for the below listed client commands:
- **announcer**: toggles support of QL match announcer events (uses vo_evil set, needs converting to 22KHz PCM WAV)
- **fm**: toggle frag messages
- **help**: toggle help text drawing
- **id**: toggle crosshair ID drawing
- **fm**: toggle frag messages
- **kb**: toggle kill beeps
- **timer**: toggle match timer drawing

### Client Commands - Gameplay
- **hook/unhook**: hook/unhook off-hand grapple
- **followkiller** : auto-follow killers when spectating (disabled by default)
- **followleader** : when spectating, auto-follows leading player
- **followpowerup** : auto-follows player picking up powerups when spectating (disabled by default)
- **forfeit**: forfeits a match (currently only in duels, requires g_allow_forfeit 1).
- **ready/notready**: sets ready status.
- **readyup**: toggles ready status.
Expand All @@ -162,9 +169,9 @@ Use **[command] [arg]** for the below listed client commands:
- **auto/a**: auto-select team
- **free/f**: join free team (non-team games)
- **spectator/s**: spectate
- **time-in** : cuts a time out short
- **time-out** : call a time out, only 1 allowed per player and lasts for value set by g_dm_timeout_length (in seconds). **g_dm_timeout_length 0** disables time outs
- **follow [clientname/clientnum]**: follow a specific player.
- **followkiller** : auto-follow killers when spectating (disabled by default)
- **followpowerup** : auto-follows player picking up powerups when spectating (disabled by default)

### Vote Commands
Use **callvote [command] [arg]** for the below listed vote commands:
Expand Down Expand Up @@ -208,6 +215,7 @@ Use **callvote [command] [arg]** for the below listed vote commands:
- **g_dm_do_readyup**: Enforce players to ready up to progress from match warmup stage (requires g_dm_do_warmup 1). (default 0)
- **g_dm_do_warmup**: Allow match warmup stage. (default 1)
- **g_dm_force_join**: replaces g_teamplay_force_join, the menu forces the cvar change so this gets around that, it now applies to regular DM too so the change makes sense.
- **g_dm_holdable_adrenaline** : when set to 1, allows holdable Adrenaline during deathmatch (default 1)
- **g_dm_no_self_damage**: when set to 1, disables any self damage after calculating knockback (default: 0)
- **g_dm_overtime**: Set stoppage time for each overtime session in seconds. Currently only applies to Duels. (default 120)
- **g_dm_powerup_drop**: when set to 1, drops carried powerups upon death (default: 1)
Expand Down Expand Up @@ -242,7 +250,7 @@ Use **callvote [command] [arg]** for the below listed vote commands:
- **g_match_lock**: when set to 1, prohibits joining the match while in progress (default 0)
- **g_motd_filename**: points to filename of message of the day file, reverts to default when blank (default motd.txt)
- **g_mover_speed_scale**: sets speed scaling factor for all movers in maps (doors, rotators, lifts etc.) (default: 1.0f)
- **g_no_powerups**: disable powerup pickups (Quad, Protection, Double, DuelFire, Invisibility, etc.)
- **g_no_powerups**: disable powerup pickups (Quad, Protection, Double, Haste, Invisibility, etc.)
- **g_owner_auto_join**: when set to 0, avoids auto-joining a match as lobby owner (default 1)
- **g_round_countdown**: sets round countdown time (in seconds) in round-based gametypes (default 10)
- **g_ruleset**: gameplay rules (default 2):
Expand Down Expand Up @@ -435,9 +443,6 @@ Some entity overrides are included which add some subtle ambient sounds, mover s
- Gladiator bots
- Menu overhaul, adding voting, full admin controls, mymap, player config

## FIXME:
- the occasional bugged lifts persist with no fix in sight :(

## Credits:
- The Stingy Hat Games YouTube channel for their excellent modding tutorial, without it I would never be able to compile the damned source!
- Nightdive team for the impressive remaster, also some on the team who patiently answered all my annoying modding questions (particularly Paril, sponge, Edward850)
Expand Down
4 changes: 3 additions & 1 deletion src/bg_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ enum powerup_t : uint8_t {
POWERUP_AM_BOMB,

POWERUP_QUAD,
POWERUP_DUELFIRE,
POWERUP_HASTE,
POWERUP_PROTECTION,
POWERUP_INVISIBILITY,
POWERUP_SILENCER,
Expand Down Expand Up @@ -258,6 +258,8 @@ enum player_stat_t {
STAT_MONSTER_COUNT,
STAT_ROUND_NUMBER,

STAT_MEDAL,

// don't use; just for verification
STAT_LAST
};
Expand Down
2 changes: 1 addition & 1 deletion src/bots/bot_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static void Player_UpdateState(gentity_t *player) {

if (player->client->pu_time_quad > level.time) {
player->sv.ent_flags |= SVFL_HAS_DMG_BOOST;
} else if (player->client->pu_time_duelfire > level.time) {
} else if (player->client->pu_time_haste > level.time) {
player->sv.ent_flags |= SVFL_HAS_DMG_BOOST;
} else if (player->client->pu_time_double > level.time) {
player->sv.ent_flags |= SVFL_HAS_DMG_BOOST;
Expand Down
41 changes: 34 additions & 7 deletions src/cg_screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,28 @@ static void CG_DrawTable(int x, int y, uint32_t width, uint32_t height, int32_t
}
}

/*
=================
CG_TimeStringMs
=================
*/
static const char *CG_TimeStringMs(const int msec) {
int hours, mins, seconds, ms = msec;

seconds = ms / 1000;
ms -= seconds * 1000;
mins = seconds / 60;
seconds -= mins * 60;
hours = mins / 60;
mins -= hours * 60;

if (hours > 0) {
return G_Fmt("{}:{:02}:{:02}.{}", hours, mins, seconds, ms).data();
} else {
return G_Fmt("{:02}:{:02}.{}", mins, seconds, ms).data();
}
}

/*
================
CG_ExecuteLayoutString
Expand Down Expand Up @@ -816,7 +838,7 @@ static void CG_ExecuteLayoutString(const char *s, vrect_t hud_vrect, vrect_t hud
cgi.Com_Error("client >= MAX_CLIENTS");
}

int score, ping;
int score, ping, time;

token = COM_Parse(&s);
if (!skip_depth)
Expand All @@ -826,23 +848,28 @@ static void CG_ExecuteLayoutString(const char *s, vrect_t hud_vrect, vrect_t hud
if (!skip_depth) {
ping = atoi(token);

token = COM_Parse(&s);
time = atoi(token);

const char *scr = time > 0 ? CG_TimeStringMs(time) : G_Fmt("{}", score).data();

cgi.SCR_SetAltTypeface(ui_acc_alttypeface->integer && true);
if (!scr_usekfont->integer)
CG_DrawString(x + 32 * scale, y, scale, cgi.CL_GetClientName(value));
else
cgi.SCR_DrawFontString(cgi.CL_GetClientName(value), x + 32 * scale, y - (font_y_offset * scale), scale, rgba_white, true, text_align_t::LEFT);

if (!scr_usekfont->integer)
CG_DrawString(x + 32 * scale, y + 10 * scale, scale, G_Fmt("{}", score).data(), true);
CG_DrawString(x + 32 * scale, y + 10 * scale, scale, scr, true);
else
cgi.SCR_DrawFontString(G_Fmt("{}", score).data(), x + 32 * scale, y + (10 - font_y_offset) * scale, scale, rgba_white, true, text_align_t::LEFT);

cgi.SCR_DrawPic(x + 96 * scale, y + 10 * scale, 9 * scale, 9 * scale, "ping");
cgi.SCR_DrawFontString(scr, x + 32 * scale, y + (10 - font_y_offset) * scale, scale, rgba_white, true, text_align_t::LEFT);

cgi.SCR_DrawPic(x + 32 + 96 * scale, y + 10 * scale, 9 * scale, 9 * scale, "ping");
if (!scr_usekfont->integer)
CG_DrawString(x + 73 * scale + 32 * scale, y + 10 * scale, scale, G_Fmt("{}", ping).data());
CG_DrawString(x + 32 + 73 * scale + 32 * scale, y + 10 * scale, scale, G_Fmt("{}", ping).data());
else
cgi.SCR_DrawFontString(G_Fmt("{}", ping).data(), x + 107 * scale, y + (10 - font_y_offset) * scale, scale, rgba_white, true, text_align_t::LEFT);
cgi.SCR_DrawFontString(G_Fmt("{}", ping).data(), x + 32 + 107 * scale, y + (10 - font_y_offset) * scale, scale, rgba_white, true, text_align_t::LEFT);

cgi.SCR_SetAltTypeface(false);
}
continue;
Expand Down
8 changes: 7 additions & 1 deletion src/g_chase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void UpdateChaseCam(gentity_t *ent) {
// mark the chased player as instanced so we can disable their model's visibility
targ->svflags |= SVF_INSTANCED;

// copy everything from ps but pmove, pov, stats, and team_id
// copy everything from ps but pmove, pov, stats, and team
ent->client->ps.viewangles = targ->client->ps.viewangles;
ent->client->ps.viewoffset = targ->client->ps.viewoffset;
ent->client->ps.kick_angles = targ->client->ps.kick_angles;
Expand Down Expand Up @@ -136,6 +136,12 @@ void UpdateChaseCam(gentity_t *ent) {
goal = trace.endpos;
goal[2] += 6;
}

ent->client->ps.gunindex = 0;
ent->client->ps.gunskin = 0;
ent->s.modelindex = 0;
ent->s.modelindex2 = 0;
ent->s.modelindex3 = 0;
}

if (targ->deadflag)
Expand Down
Loading

0 comments on commit 548fa87

Please sign in to comment.