Skip to content

Commit

Permalink
Small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikk155 committed Jun 11, 2024
1 parent a76ac47 commit 0598922
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions src/utils/Language.as
Original file line number Diff line number Diff line change
Expand Up @@ -218,25 +218,25 @@ namespace Language
case HUDMSG:
{
HUDTextParams textParams;
textParams.x = float( pJson[ 'x', -1 ] );
textParams.y = float( pJson[ 'y', -1 ] );
textParams.effect = pJson[ 'effect', 1 ];
textParams.x = float( pJson[ 'x' ] );
textParams.y = float( pJson[ 'y' ] );
textParams.effect = int( pJson[ 'effect' ] );

RGBA rgba = atorgba( pJson[ 'color', '255 255 255' ] );
RGBA rgba = RGBA( pJson[ 'color' ] );
textParams.r1 = rgba.r;
textParams.g1 = rgba.g;
textParams.b1 = rgba.b;

RGBA rgba2 = atorgba( pJson[ 'color2', '255 255 255' ] );
RGBA rgba2 = RGBA( pJson[ 'color2' ] );
textParams.r2 = rgba.r;
textParams.g2 = rgba.g;
textParams.b2 = rgba.b;

textParams.fadeinTime = float( pJson[ 'fadein', 0 ] );
textParams.fadeoutTime = float( pJson[ 'fadeout', 1 ] );
textParams.holdTime = float( pJson[ 'hold', 1 ] );
textParams.fxTime = float( pJson[ 'fxtime', 1 ] );
textParams.channel = pJson[ 'channel', 8 ];
textParams.fadeinTime = float( pJson[ 'fadein' ] );
textParams.fadeoutTime = float( pJson[ 'fadeout' ] );
textParams.holdTime = float( pJson[ 'hold' ] );
textParams.fxTime = float( pJson[ 'fxtime' ] );
textParams.channel = int( pJson[ 'channel' ] );

g_PlayerFuncs.HudMessage( pPlayer, textParams, m_szMessage + '\n' );
break;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/json.as
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class json
{
protected array<string> OpIndex;
protected int keysize = 0;
protected string json = String::EMPTY_STRING;
string json = String::EMPTY_STRING;
dictionary data;

json()
Expand Down Expand Up @@ -240,7 +240,7 @@ class json
}
*/

private void parse()
void parse()
{
string file = this.json;
this.data = ParseJsonFile( file );
Expand Down

0 comments on commit 0598922

Please sign in to comment.