public void ServerCmdToggleCamera(coGameConnection client) { string control; if (client.getControlObject() == client["player"]) { ((coCamera)client["camera"]).setVelocity(new Point3F("0 0 0")); control = client["camera"]; } else { ((coCamera)client["player"]).setVelocity(new Point3F("0 0 0")); control = client["player"]; } client.setControlObject(control); console.Call("clientCmdSyncEditorGui"); }
public void ServerCmdCycleWeapon(coGameConnection client, string direction) { ShapeBaseCycleWeapon(client.getControlObject(), direction); }
public void ServerCmdReloadWeapon(coGameConnection client) { coPlayer player = client.getControlObject(); coItemData image = player.getMountedImage(iGlobal["$WeaponSlot"]); if (ShapeBaseShapeBaseGetInventory(player, image["ammo"]) == image["ammo.maxInventory"].AsInt()) { return; } if (image > 0) WeaponImageClearAmmoClip(image, player, sGlobal["$WeaponSlot"].AsInt()); }
public void ServerCmdUse(coGameConnection client, coItem data) { if (((coPlayer)client.getControlObject()).isObject()) ((coPlayer)client.getControlObject()).call("use", data); }