Commit working background map motd removal.

Fixed the motd/briefings/class from showing on the background again.
Also uploaded old obco/shadowsource/seco7 maps from past versions for
examples to play. Uploaded current .dll files.
This commit is contained in:
whoozzem 2013-09-28 14:52:25 +01:00
parent 94a728c355
commit 7dc427033a
23 changed files with 186 additions and 61 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Place your Mission Briefing Title Here.</title>
<title>Mission Briefing Title.</title>
<style type="text/css">
pre {
font-family:Verdana,Tahoma;
@ -32,11 +32,13 @@ a:hover {
</head>
<body scroll="no">
<pre>
The name of a briefing.txt file must always be:
Play with some other players.
mapPrefix_mapName_briefing.txt
so:
"seco7"_"hl2_defector_example"_briefing.txt
A fight is about to commence!
Are you ready for it?!
It's (more or less) all over when the music plays.
</pre>
</body>

View file

@ -40,7 +40,7 @@ The name of a briefing.txt file must always be:
mapPrefix_mapName_briefing.txt
so:
"seco7"_"hl2_defector_example"_briefing.txt
"SecobMod"_"CoOp_Defector"_briefing.txt
</pre>
</body>

View file

@ -0,0 +1,45 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Mission Briefing Title.</title>
<style type="text/css">
pre {
font-family:Verdana,Tahoma;
color:#FFB000;
}
body {
background:#000000;
margin-left:8px;
margin-top:0px;
}
a {
text-decoration: underline;
}
a:link {
color: #FFFFFF;
}
a:visited {
color: #FFFFFF;
}
a:active {
color: #FFFFFF;
}
a:hover {
color: #FFFFFF;
text-decoration: underline;
}
</style>
</head>
<body scroll="no">
<pre>
Play with some other players.
A fight is about to commence!
Are you ready for it?!
It's (more or less) all over when the music plays.
</pre>
</body>
</html>

View file

@ -0,0 +1,49 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Mission Briefing Title.</title>
<style type="text/css">
pre {
font-family:Verdana,Tahoma;
color:#FFB000;
}
body {
background:#000000;
margin-left:8px;
margin-top:0px;
}
a {
text-decoration: underline;
}
a:link {
color: #FFFFFF;
}
a:visited {
color: #FFFFFF;
}
a:active {
color: #FFFFFF;
}
a:hover {
color: #FFFFFF;
text-decoration: underline;
}
</style>
</head>
<body scroll="no">
<pre>
This map is to test out the save/restore transition code.
Shoot some ammo, move to the other side of the room.
Map transition takes place and hopefully you'll
spawn without the class menu appearing and also
with all the same ammo,armour and health stats
as before you transitioned.
</pre>
</body>
</html>

View file

@ -0,0 +1,49 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Mission Briefing Title.</title>
<style type="text/css">
pre {
font-family:Verdana,Tahoma;
color:#FFB000;
}
body {
background:#000000;
margin-left:8px;
margin-top:0px;
}
a {
text-decoration: underline;
}
a:link {
color: #FFFFFF;
}
a:visited {
color: #FFFFFF;
}
a:active {
color: #FFFFFF;
}
a:hover {
color: #FFFFFF;
text-decoration: underline;
}
</style>
</head>
<body scroll="no">
<pre>
This map is to test out the save/restore transition code.
Shoot some ammo, move to the other side of the room.
Map transition takes place and hopefully you'll
spawn without the class menu appearing and also
with all the same ammo,armour and health stats
as before you transitioned.
</pre>
</body>
</html>

Binary file not shown.

Binary file not shown.

View file

@ -267,6 +267,16 @@ static void __MsgFunc_VGUIMenu( bf_read &msg )
// is the server trying to show an MOTD panel? Check that it's allowed right now.
ClientModeShared *mode = ( ClientModeShared * )GetClientModeNormal();
#ifdef SecobMod__BG_FIX
//SecobMod__Information Prevent the info panel (briefings/motd) from being shown on main menu maps.
if ( (Q_stricmp( panelname, PANEL_INFO ) == 0) && engine->IsLevelMainMenuBackground() )
return;
//SecobMod__Information may as well throw in a check against the class panel being shown here.
if ( (Q_stricmp( panelname, PANEL_CLASS ) == 0) && engine->IsLevelMainMenuBackground() )
return;
#endif //SecobMod__BG_FIX
if ( Q_stricmp( panelname, PANEL_INFO ) == 0 && mode )
{
if ( !mode->IsInfoPanelAllowed() )

View file

@ -137,7 +137,7 @@ CTextWindow::~CTextWindow()
void CTextWindow::Reset( void )
{
#ifndef SecobMod__BG_MOTD_FIX
#ifndef SecobMod__BG_FIX
//=============================================================================
// HPE_BEGIN:
// [Forrest] Replace strange hard-coded default message with hard-coded error message.
@ -154,7 +154,7 @@ void CTextWindow::Reset( void )
m_bShownURL = false;
m_bUnloadOnDismissal = false;
Update();
#endif //SecobMod__BG_MOTD_FIX
#endif //SecobMod__BG_FIX
}
void CTextWindow::ShowText( const char *text )

View file

@ -1081,10 +1081,6 @@ void CInput::ExtraMouseSample( float frametime, bool active )
prediction->SetLocalViewAngles( cmd->viewangles );
}
#ifdef SecobMod__MULTIPLAYER_CHAT_BUBBLES
extern int g_iChatBubble;
#endif //SecobMod__MULTIPLAYER_CHAT_BUBBLES
// Let the headtracker override the view at the very end of the process so
// that vehicles and other stuff in g_pClientMode->CreateMove can override
// first
@ -1113,6 +1109,10 @@ void CInput::ExtraMouseSample( float frametime, bool active )
}
#ifdef SecobMod__MULTIPLAYER_CHAT_BUBBLES
extern int g_iChatBubble;
#endif //SecobMod__MULTIPLAYER_CHAT_BUBBLES
void CInput::CreateMove ( int sequence_number, float input_sample_frametime, bool active )
{
CUserCmd *cmd = &m_pCommands[ sequence_number % MULTIPLAYER_BACKUP ];

View file

@ -1071,34 +1071,11 @@ bool CServerGameDLL::LevelInit( const char *pMapName, char const *pMapEntities,
// to be parsed (the above code has loaded all point_template entities)
PrecachePointTemplates();
#ifdef SecobMod__BG_MOTD_FIX
if ( !Q_strnicmp( gpGlobals->mapname.ToCStr(), "SecobMod__bkgd", 14 ))
{
//SecobMod__Information: Background maps don't load the MOTD.
}
else
{
// load MOTD from file into stringtable
LoadMessageOfTheDay();
}
#ifdef SecobMod__ENABLE_MAP_BRIEFINGS
LoadMapBriefing(); // Obsidian
#else
// load MOTD from file into stringtable
LoadMessageOfTheDay();
#endif //#define SecobMod__BG_MOTD_FIX
#ifdef SecobMod__ENABLE_MAP_BRIEFINGS
#ifdef SecobMod__BG_MOTD_FIX
if ( !Q_strnicmp( gpGlobals->mapname.ToCStr(), "SecobMod__bkgd", 14 ))
{
//SecobMod__Information: Background maps don't load the briefing.
}
else
{
LoadMapBriefing(); // Obsidian
}
#else
LoadMapBriefing(); // Obsidian
#endif //SecobMod__BG_MOTD_FIX
#endif //SecobMod__ENABLE_MAP_BRIEFINGS
// Sometimes an ent will Remove() itself during its precache, so RemoveImmediate won't happen.

View file

@ -1801,9 +1801,7 @@ public:
float m_flRotation;
float m_flSinwave;
float m_flAlpha;
EHANDLE player;
virtual void Spawn()
{
SetModel(CHAT_BUBBLE_MODEL);
@ -1820,15 +1818,12 @@ public:
SetRenderColorA( m_flAlpha );
SetRenderColor( m_flAlpha, m_flAlpha, m_flAlpha );
SetRenderMode( kRenderTransAdd );
SetRenderMode( kRenderTransAdd );
}
virtual void Precache()
{
PrecacheModel(CHAT_BUBBLE_MODEL);
}
virtual void BubbleThink( void ){
// rotate the chatbubble
QAngle aRotations = GetAbsAngles();
@ -1843,14 +1838,12 @@ public:
if( m_flSinwave > 1000 )
m_flSinwave = 0;
float flVerticalOffset = sin( m_flSinwave ) * 5;
// clamp to the player's position and go up above the head
Vector fr, rt, up;
AngleVectors(player->GetAbsAngles(), &fr, &rt, &up);
Vector offset = player->GetAbsOrigin() + up * ( 92 + flVerticalOffset );
Vector offset = player->GetAbsOrigin() + up * ( 85 + flVerticalOffset );
SetAbsOrigin( offset );
Vector offsetNew = GetAbsOrigin();
SetAbsOrigin( offsetNew );
}
if( m_flAlpha < 255 ){
@ -1885,7 +1878,7 @@ void CBasePlayer::MakeChatBubble(int chatbubble)
Vector fr, rt, up;
AngleVectors(GetAbsAngles(), &fr, &rt, &up);
//Vector offset = GetAbsOrigin() + up * 64;
Vector offset = GetAbsOrigin() + up * 92;
Vector offset = GetAbsOrigin() + up * 85;
CChatBubble *pBubble = (CChatBubble*)CBaseEntity::CreateNoSpawn( "chat_bubble", offset, GetAbsAngles(), this );
if (pBubble)
@ -1920,7 +1913,6 @@ void CBasePlayer::CheckChatBubble( CUserCmd *cmd )
else
KillChatBubble();
}
#endif //SecobMod__MULTIPLAYER_CHAT_BUBBLES
void CBasePlayer::Event_Dying( const CTakeDamageInfo& info )

View file

@ -12,7 +12,7 @@
/*****************/
/* Base Defines. */
/*****************/
#define SecobMod__MiscFixes //Used when a fix doesn't quite fit in any of the other defined categorties.
#define SecobMod__MiscFixes //Used when a fix doesn't quite fit in any of the other defined categories.
#define SecobMod__Enable_Fixed_Multiplayer_AI //Allow AI in your mod, also fixes numerous crashes to do with AI and related features.
#define SecobMod__PREVENT_ITEM_WEAPON_RESPAWNING //Prevent items and weapons from respawning after being picked up by a player. Actually we cheat and set the respawn time insanely high.
@ -22,10 +22,10 @@
/***************************/
#define SecobMod__SHOW_GAME_MESSAGES_TO_ALL //Allow all players to see env_messages. Very useful for end-game strings as used in HL2.
#define SecobMod__ALLOW_SUPER_GRAVITY_GUN //Allows Super Gravity Gun. Mostly coded by Kave.
#define SecobMod__MULTIPLAYER_LEVEL_TRANSITIONS //Allow automatic level changes if all players are in the transition zone (percantage can be modified).
#define SecobMod__MULTIPLAYER_LEVEL_TRANSITIONS //Allow automatic level changes if all players are in the transition zone (percentage can be modified).
#define SecobMod__SAVERESTORE //Carries over loadouts from map to map. Only works if MULTIPLAYER_LEVEL_TRANSITIONS are enabled.
#define SecobMod__FIX_VEHICLE_PLAYER_CAMERA_JUDDER //Vehicle view judder removed. ESSENTIAL if you use vehicles anywhere in your mod.
#define SecobMod__ALLOW_PLAYER_MODELS_IN_VEHICLES //Shows the player model in vehicles.
#define SecobMod__ALLOW_PLAYER_MODELS_IN_VEHICLES //Shows the player model in vehicles (add your own animations-currently we just crouch).
/**************************/
/* Multiplayer Additions. */
@ -34,7 +34,7 @@
#define SecobMod__ENABLE_DYNAMIC_PLAYER_RESPAWN_CODE //Respawn where you were killed or for preference near a living player as opposed to back at the start of a map.
#define SecobMod__USE_PLAYERCLASSES //Enable player classes.
#define SecobMod__MULTIPLAYER_VIEWCONTROL_CAMERAS //Fixes the View Control Cameras so that all clients are affected by View Control cameras.
#define SecobMod__FORCE_TEAMPLAY_AS_ALWAYS_ON //Forces teamplay to always be enabled.
//#define SecobMod__FORCE_TEAMPLAY_AS_ALWAYS_ON //Forces teamplay to always be enabled.
#define SecobMod__ENABLE_FAKE_PASSENGER_SEATS //Allows a hacky passenger seat to be added to valves vehicles (jeep and jalopy).
/**********************/
@ -48,7 +48,7 @@
/************************/
/* Player Enhancements. */
/************************/
#define SecobMod__IRONSIGHT_ENABLED //Allow basic version of ironsight.
#define SecobMod__IRONSIGHT_ENABLED //Allow basic version of ironsight. Use the keypad minus key to toggle the ironsight_toggle console command.
#define SecobMod__ENABLE_NIGHTVISION_FOR_HEAVY_CLASS //Give the heavy class nightvision (use the 'N' key to toggle on/off)
#define SecobMod__PLAYERS_CAN_PICKUP_OBJECTS //Players can pickup objects with their hands.
#define SecobMod__CAN_SPRINT_WITHOUT_SUIT //Players can sprint without the HEV suit.
@ -71,7 +71,7 @@
/**********************/
/* Map Enhancements. */
/*********************/
#define SecobMod__ENABLE_MAP_BRIEFINGS //Have map briefing VGUI windows (identical to MOTD) describing the loaded map.
#define SecobMod__ENABLE_MAP_BRIEFINGS //Have map briefing VGUI windows (identical to MOTD so you can have either briefings or an motd but not both!) describing the loaded map.
#define SecobMod__ENABLE_MAP_SPECIFIC_PLAYER_MODEL_OVERRIDES //This allows mappers to override the default player models with one single player model.
//#define SecobMod__USE_CSS_LADDERS //Use the easier to map with counter strike source ladders in your maps.
@ -80,7 +80,7 @@
/************************/
#define SecobMod__Force_LAN_DISABLED //Disable Lan games from activating on server startup.
#define SecobMod__ALLOW_VALVE_APPROVED_CHEATING //Allow sv_cheats to work.
//#define SecobMod__MULTIPLAYER_CHAT_BUBBLES //Shows a chat icon while a player is typing.
#define SecobMod__MULTIPLAYER_CHAT_BUBBLES //Shows a chat icon while a player is typing.
#define SecobMod__HIGH_PING_VEHICLE_FIX //Remove vehicle judder for players with high latency (lag) at the cost of forward/backwards view dampening.
//#define SecobMod__ALLOW_JEEP_HEADLIGHTS //Allows headlights to work in jeep/jalopy.
@ -93,7 +93,7 @@
/******************/
/* SDK Bug Fixes. */
/******************/
#define SecobMod__BG_MOTD_FIX //Stops the MOTD showing on main menu maps.
#define SecobMod__BG_FIX //Stops the MOTD/Briefing Panel and the Class Menu from showing on main menu maps.
#define SecobMod__FIX_SHOTGUN_FAST_SWITCH_BUG //Fixes a bug in the shotgun code - Community fix submitted fix by SubZero.
#endif // SecobMod__SHAREDDEFS_H

View file

@ -108,10 +108,6 @@ public:
CRC32_Init( &crc );
#ifdef SecobMod__MULTIPLAYER_CHAT_BUBBLES
CRC32_ProcessBuffer( &crc, &chatbubble, sizeof ( chatbubble ) );
#endif //SecobMod__MULTIPLAYER_CHAT_BUBBLES
CRC32_ProcessBuffer( &crc, &command_number, sizeof( command_number ) );
CRC32_ProcessBuffer( &crc, &tick_count, sizeof( tick_count ) );
CRC32_ProcessBuffer( &crc, &viewangles, sizeof( viewangles ) );
@ -125,6 +121,11 @@ public:
CRC32_ProcessBuffer( &crc, &random_seed, sizeof( random_seed ) );
CRC32_ProcessBuffer( &crc, &mousedx, sizeof( mousedx ) );
CRC32_ProcessBuffer( &crc, &mousedy, sizeof( mousedy ) );
#ifdef SecobMod__MULTIPLAYER_CHAT_BUBBLES
CRC32_ProcessBuffer( &crc, &chatbubble, sizeof ( chatbubble ) );
#endif //SecobMod__MULTIPLAYER_CHAT_BUBBLES
CRC32_Final( &crc );
return crc;