mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
Add working debug level with grass and soil tiles
- Created DebugLevel class that bypasses complex TiledLevel loader - Simple platform with grass tiles (10.gif) on top, soil tiles (10.gif) underneath - Fixed tile texture paths to work with MAPS_PATH - Fixed null check in User.js to prevent server crashes - Working physics collision with Box2D - Clean test environment for physics engine migration
This commit is contained in:
parent
e6089687ed
commit
244dc50037
8 changed files with 336 additions and 6 deletions
|
|
@ -92,7 +92,13 @@ function (Parent, ProtocolHelper, nc) {
|
|||
User.prototype.onGameCommand = function(options) {
|
||||
// repacking for transport via pipe
|
||||
var message = ProtocolHelper.encodeCommand("gameCommand", options);
|
||||
this.channelPipe.sendToUser(this.id, message);
|
||||
|
||||
// Check if channelPipe exists before trying to send
|
||||
if (this.channelPipe) {
|
||||
this.channelPipe.sendToUser(this.id, message);
|
||||
} else {
|
||||
console.warn("User " + this.id + " tried to send game command but channelPipe is null");
|
||||
}
|
||||
};
|
||||
|
||||
User.prototype.onPing = function(timestamp) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue