Added gibshooter, but it's disabled because the maps that uses expect it
to have a concept of states, so in order to not create thousands of ents...
This commit is contained in:
parent
b4423ec32f
commit
9386b7f158
2 changed files with 73 additions and 0 deletions
|
@ -52,8 +52,10 @@ server/trigger_teleport.cpp
|
|||
server/trigger_transition.cpp
|
||||
server/trigger_relay.cpp
|
||||
server/env_shooter.cpp
|
||||
server/gibshooter.cpp
|
||||
server/env_beverage.cpp
|
||||
server/env_global.cpp
|
||||
server/env_laser.cpp
|
||||
server/item_food.cpp
|
||||
server/multi_manager.cpp
|
||||
server/monster_furniture.cpp
|
||||
|
|
71
src/gs-entbase/server/gibshooter.cpp
Normal file
71
src/gs-entbase/server/gibshooter.cpp
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2019 Marco Hladik <marco@icculus.org>
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*QUAKED gibshooter (1 0 0) (-8 -8 -8) (8 8 8)
|
||||
"targetname" Name
|
||||
"target" Target when triggered.
|
||||
"killtarget" Target to kill when triggered.
|
||||
"angles" Sets the pitch, yaw and roll direction of the shooter.
|
||||
"shootmodel" Model file to shoot.
|
||||
"shootsounds" PCM sample to play whenever a piece shoots out.
|
||||
"m_iGibs" Amount of models shot in total.
|
||||
"m_flDelay" Delay before being able to be fired again.
|
||||
"m_flVelocity" Speed of the models in units per second.
|
||||
"m_flVariance" Delay between shots.
|
||||
"m_flGibLife" Life of the individual model piece.
|
||||
"scale" Scale modifier of the model pieces.
|
||||
|
||||
Shoots model entities from its location.
|
||||
*/
|
||||
|
||||
class gibshooter2 : env_shooter
|
||||
{
|
||||
void() gibshooter2;
|
||||
};
|
||||
|
||||
void gibshooter2 :: gibshooter2 ( void )
|
||||
{
|
||||
for ( int i = 1; i < ( tokenize( __fullspawndata ) - 1 ); i += 2 ) {
|
||||
switch ( argv( i ) ) {
|
||||
case "m_iGibs":
|
||||
m_iGibs = stoi( argv( i + 1 ) );
|
||||
break;
|
||||
case "delay":
|
||||
case "m_flDelay":
|
||||
m_flDelay = stof( argv( i + 1 ) );
|
||||
break;
|
||||
case "m_flVelocity":
|
||||
m_flVelocity = stof( argv( i + 1 ) );
|
||||
break;
|
||||
case "m_flVariance":
|
||||
m_flVariance = stof( argv( i + 1 ) );
|
||||
break;
|
||||
case "m_flGibLife":
|
||||
m_flGibLife = stof( argv( i + 1 ) );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_strShootModel = "models/hgibs.mdl";
|
||||
m_flShootSounds = 3;
|
||||
m_flScale = 1.0;
|
||||
|
||||
precache_model( m_strShootModel );
|
||||
CBaseTrigger::CBaseTrigger();
|
||||
env_shooter::Respawn();
|
||||
}
|
Loading…
Reference in a new issue