Skip to content

Commit

Permalink
Added port-forwarding commands
Browse files Browse the repository at this point in the history
Better server client initializing
Better server-side map navigation
  • Loading branch information
Ohmnivore committed Jun 13, 2014
1 parent c05a7e4 commit 1db5002
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Binary file modified Client/export/windows/cpp/bin/SkullRush.exe
Binary file not shown.
18 changes: 9 additions & 9 deletions Client/source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ class PlayState extends FlxState

public var cross:FlxCrosshairs;

public var buffer_string:String;
//public var buffer_string:String;

public function new(BufferString:String = null)
{
super();

buffer_string = BufferString;
//buffer_string = BufferString;
}

/**
Expand Down Expand Up @@ -160,10 +160,10 @@ class PlayState extends FlxState

m = new Mutex();

if (buffer_string != null)
{
loadMap("Test", buffer_string);
}
//if (buffer_string != null)
//{
//loadMap("Test", buffer_string);
//}
}

public function sendChatMsg():Void
Expand Down Expand Up @@ -202,13 +202,13 @@ class PlayState extends FlxState
public function onLoaded():Void
{
trace("Loaded external assets.");
if (buffer_string == null)
{
//if (buffer_string == null)
//{
Msg.PlayerInfo.data.set("name", Assets.config.get("name"));
Msg.PlayerInfo.data.set("team", Assets.config.get("team"));

Reg.client.send(Msg.PlayerInfo.ID, 1, ENet.ENET_PACKET_FLAG_RELIABLE);
}
//}
}

public function loadMap(MapName:String, MapString:String):Void
Expand Down
4 changes: 2 additions & 2 deletions Client/source/SkullClient.hx
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ class SkullClient extends Client
{
//if (Reg.state.collidemap != null)
//FlxG.switchState(new PlayState());
//Reg.state.loadMap(Msg.MapMsg.data.get("mapname"), Msg.MapMsg.data.get("mapstring"));
FlxG.switchState(new PlayState(Msg.MapMsg.data.get("mapstring")));
Reg.state.loadMap(Msg.MapMsg.data.get("mapname"), Msg.MapMsg.data.get("mapstring"));
//FlxG.switchState(new PlayState(Msg.MapMsg.data.get("mapstring")));
}

if (MsgID == Msg.PlayerInfoBack.ID)
Expand Down

0 comments on commit 1db5002

Please sign in to comment.