mirror of
https://github.com/fortressforever/fortressforever-2013.git
synced 2024-11-29 07:32:39 +00:00
Added HUD message overload that accepts CRecipientFilter.
This commit is contained in:
parent
a629a38627
commit
a9147a53bd
4 changed files with 25 additions and 6 deletions
|
@ -31,6 +31,18 @@ void FF_UTIL_HudMessageFormat(CBasePlayer *pToPlayer, float x, float y, HUD_MSG_
|
|||
}
|
||||
|
||||
void FF_UTIL_HudMessage(CBasePlayer *pToPlayer, float x, float y, HUD_MSG_EFFECT effect, color32 color1, color32 color2, float fadeInTime, float fadeOutTime, float holdTime, float fxTime, int channel, const char *pszMessage)
|
||||
{
|
||||
CRecipientFilter filter;
|
||||
|
||||
if( pToPlayer )
|
||||
filter.AddRecipient( pToPlayer );
|
||||
else
|
||||
filter.AddAllPlayers();
|
||||
|
||||
FF_UTIL_HudMessage(filter, x, y, effect, color1, color2, fadeInTime, fadeOutTime, holdTime, fxTime, channel, pszMessage);
|
||||
}
|
||||
|
||||
void FF_UTIL_HudMessage(CRecipientFilter &filter, float x, float y, HUD_MSG_EFFECT effect, color32 color1, color32 color2, float fadeInTime, float fadeOutTime, float holdTime, float fxTime, int channel, const char *pszMessage)
|
||||
{
|
||||
hudtextparms_s params;
|
||||
params.x = x;
|
||||
|
@ -50,5 +62,5 @@ void FF_UTIL_HudMessage(CBasePlayer *pToPlayer, float x, float y, HUD_MSG_EFFECT
|
|||
params.fxTime = fxTime;
|
||||
params.channel = channel;
|
||||
|
||||
UTIL_HudMessage(pToPlayer, params, pszMessage);
|
||||
UTIL_HudMessage(filter, params, pszMessage);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ enum HUD_MSG_EFFECT
|
|||
HUD_EFFECT_WRITE_OUT
|
||||
};
|
||||
|
||||
void FF_UTIL_HudMessage( CRecipientFilter &filter, float x, float y, HUD_MSG_EFFECT effect, color32 color1, color32 color2, float fadeInTime, float fadeOutTime, float holdTime, float fxTime, int channel, const char *pszMessage );
|
||||
void FF_UTIL_HudMessage( CBasePlayer *pToPlayer, float x, float y, HUD_MSG_EFFECT effect, color32 color1, color32 color2, float fadeInTime, float fadeOutTime, float holdTime, float fxTime, int channel, const char *pszMessage );
|
||||
void FF_UTIL_HudMessageFormat( CBasePlayer *pToPlayer, float x, float y, HUD_MSG_EFFECT effect, color32 color1, color32 color2, float fadeInTime, float fadeOutTime, float holdTime, float fxTime, int channel, const char *pszFormat, ... );
|
||||
void FF_UTIL_HudMessageAll( float x, float y, HUD_MSG_EFFECT effect, color32 color1, color32 color2, float fadeInTime, float fadeOutTime, float holdTime, float fxTime, int channel, const char *pszMessage );
|
||||
|
|
|
@ -1017,20 +1017,23 @@ void UTIL_ScreenFade( CBaseEntity *pEntity, const color32 &color, float fadeTime
|
|||
UTIL_ScreenFadeWrite( fade, pEntity );
|
||||
}
|
||||
|
||||
|
||||
// FF --> hlstriker: Modified
|
||||
void UTIL_HudMessage( CBasePlayer *pToPlayer, const hudtextparms_t &textparms, const char *pMessage )
|
||||
{
|
||||
CRecipientFilter filter;
|
||||
|
||||
if( pToPlayer )
|
||||
{
|
||||
filter.AddRecipient( pToPlayer );
|
||||
}
|
||||
else
|
||||
{
|
||||
filter.AddAllPlayers();
|
||||
}
|
||||
|
||||
UTIL_HudMessage( filter, textparms, pMessage );
|
||||
}
|
||||
// FF <--
|
||||
|
||||
// FF --> hlstriker: Added
|
||||
void UTIL_HudMessage( CRecipientFilter &filter, const hudtextparms_t &textparms, const char *pMessage )
|
||||
{
|
||||
filter.MakeReliable();
|
||||
|
||||
UserMessageBegin( filter, "HudMsg" );
|
||||
|
@ -1053,6 +1056,7 @@ void UTIL_HudMessage( CBasePlayer *pToPlayer, const hudtextparms_t &textparms, c
|
|||
WRITE_STRING( pMessage );
|
||||
MessageEnd();
|
||||
}
|
||||
// FF <--
|
||||
|
||||
void UTIL_HudMessageAll( const hudtextparms_t &textparms, const char *pMessage )
|
||||
{
|
||||
|
|
|
@ -181,6 +181,7 @@ inline bool FNullEnt(const edict_t* pent)
|
|||
|
||||
class CBaseEntity;
|
||||
class CBasePlayer;
|
||||
class CRecipientFilter; // FF --> hlstriker: Added for the filter version of UTIL_HudMessage.
|
||||
|
||||
extern CGlobalVars *gpGlobals;
|
||||
|
||||
|
@ -470,6 +471,7 @@ void UTIL_SetModel( CBaseEntity *pEntity, const char *pModelName );
|
|||
// prints as transparent 'title' to the HUD
|
||||
void UTIL_HudMessageAll( const hudtextparms_t &textparms, const char *pMessage );
|
||||
void UTIL_HudMessage( CBasePlayer *pToPlayer, const hudtextparms_t &textparms, const char *pMessage );
|
||||
void UTIL_HudMessage( CRecipientFilter &filter, const hudtextparms_t &textparms, const char *pMessage ); // FF --> hlstriker: Added
|
||||
|
||||
// brings up hud keyboard hints display
|
||||
void UTIL_HudHintText( CBaseEntity *pEntity, const char *pMessage );
|
||||
|
|
Loading…
Reference in a new issue