2019-08-31 19:18:15 -07:00
|
|
|
/*
|
2020-04-07 05:46:23 -07:00
|
|
|
* Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
|
2019-08-31 19:18:15 -07:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2019-09-06 20:37:06 -07:00
|
|
|
/*QUAKED func_pushable (0 .5 .8) ? SF_TRIGGER SF_TOUCH SF_PRESSURE
|
|
|
|
"targetname" Name
|
|
|
|
"target" Target when triggered.
|
|
|
|
"killtarget" Target to kill when triggered.
|
|
|
|
|
|
|
|
STUB!
|
2020-10-25 04:38:41 -07:00
|
|
|
|
|
|
|
Trivia:
|
|
|
|
This entity was introduced in Half-Life (1998).
|
2019-09-06 20:37:06 -07:00
|
|
|
*/
|
|
|
|
|
2020-04-12 06:50:42 -07:00
|
|
|
class func_pushable:func_breakable
|
2019-03-13 08:48:58 -07:00
|
|
|
{
|
2020-11-13 02:17:42 -08:00
|
|
|
void(void) func_pushable;
|
|
|
|
|
|
|
|
virtual void(void) customphysics;
|
2020-04-12 06:50:42 -07:00
|
|
|
virtual void(void) touch;
|
2019-03-13 08:48:58 -07:00
|
|
|
};
|
2020-03-08 01:59:46 -08:00
|
|
|
|
2020-11-13 02:17:42 -08:00
|
|
|
void
|
|
|
|
func_pushable::customphysics(void)
|
|
|
|
{
|
|
|
|
tracebox(origin, mins, maxs, origin + (velocity * frametime), MOVE_NORMAL, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
func_pushable::touch(void)
|
2020-03-08 01:59:46 -08:00
|
|
|
{
|
|
|
|
if (other.movetype == MOVETYPE_WALK) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
velocity = other.velocity * 0.25;
|
|
|
|
}
|
2020-11-13 02:17:42 -08:00
|
|
|
|
|
|
|
void
|
|
|
|
func_pushable::func_pushable(void)
|
|
|
|
{
|
|
|
|
func_breakable::func_breakable();
|
|
|
|
}
|