33 lines
798 B
Text
33 lines
798 B
Text
|
|
||
|
object vehicle_hog : vehicle_base {
|
||
|
void init();
|
||
|
|
||
|
void OnCollision( object traceObject, float velocity, vector mins, vector maxs );
|
||
|
|
||
|
void OnWeaponSelected( entity p, float index );
|
||
|
|
||
|
float nextCollisionEffectTime;
|
||
|
}
|
||
|
|
||
|
void vehicle_hog::init() {
|
||
|
setLightsEnabled( 0, false );
|
||
|
}
|
||
|
|
||
|
void vehicle_hog::OnCollision( object traceObject, float velocity, vector mins, vector maxs ) {
|
||
|
OnCollision_Base( traceObject, velocity, mins, maxs );
|
||
|
}
|
||
|
|
||
|
void vehicle_hog::OnWeaponSelected( entity p, float index ) {
|
||
|
if ( index == 0 ) {
|
||
|
FireDecoy( p );
|
||
|
} else if ( index == 1 ) {
|
||
|
selectVehicleWeapon( p, "hyperblaster" );
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void vehicle_hog::vOnDeploy() {
|
||
|
vector origin = getWorldOrigin();
|
||
|
setWorldOrigin( origin + '0 0 32' );
|
||
|
setLinearVelocity( vec3_origin );
|
||
|
}
|