Created
April 23, 2016 23:39
-
-
Save qoh/6aba4a39e9d0e768e1438a6e797663b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datablock PlayerData(EmptyArmor) | |
{ | |
shapeFile = "base/data/shapes/empty.dts"; | |
invincible = true; | |
splashEmitter[0] = PlayerFoamDropletsEmitter; | |
splashEmitter[1] = PlayerFoamEmitter; | |
splashEmitter[2] = PlayerBubbleEmitter; | |
}; | |
function AIPlayer::setMountedLight(%this, %data) | |
{ | |
if (isObject(%this.mountedLight)) | |
%this.mountedLight.delete(); | |
if (isObject(%data)) | |
{ | |
%this.mountedLight = new fxLight() | |
{ | |
datablock = %data; | |
position = %this.position; | |
}; | |
MissionCleanup.add(%this.mountedLight); | |
%this.mountedLight.attachToObject(%this); | |
} | |
} | |
function WheeledVehicle::spawnMountedLightBot(%this, %slot) | |
{ | |
%player = new AIPlayer() | |
{ | |
datablock = EmptyArmor; | |
position = %this.position; | |
}; | |
MissionCleanup.add(%player); | |
%this.mountedLightBot[%slot] = %player; | |
%this.mountObject(%player, %slot); | |
} | |
function WheeledVehicle::removeMountedLightBot(%this, %slot) | |
{ | |
%player = %this.mountedLightBot[%slot]; | |
if (isObject(%player)) | |
{ | |
if (isObject(%player.mountedLight)) | |
%player.mountedLight.delete(); | |
%player.delete(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment