point_servercommand: initial implementation of this Half-Life 2 entity
This commit is contained in:
parent
59748adf86
commit
62426ba5d3
2 changed files with 58 additions and 0 deletions
|
@ -59,6 +59,7 @@ server/player_loadsaved.qc
|
|||
server/prop_dynamic.qc
|
||||
server/prop_physics.qc
|
||||
server/point_camera.qc
|
||||
server/point_servercommand.qc
|
||||
server/point_trigger.qc
|
||||
server/targ_speaker.qc
|
||||
server/target_cdaudio.qc
|
||||
|
|
57
src/gs-entbase/server/point_servercommand.qc
Normal file
57
src/gs-entbase/server/point_servercommand.qc
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Vera Visions LLC.
|
||||
*
|
||||
* 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 point_servercommand (1 .5 0) (-8 -8 -8) (8 8 8)
|
||||
# OVERVIEW
|
||||
Issues console commands on server when triggered.
|
||||
|
||||
# KEYS
|
||||
- "targetname" : Name
|
||||
|
||||
# INPUTS
|
||||
- "Command" : Enters a command into the server console, input data being the command.
|
||||
|
||||
# TRIVIA
|
||||
This entity was introduced in Half-Life 2 (2004).
|
||||
*/
|
||||
class
|
||||
point_servercommand:NSPointTrigger
|
||||
{
|
||||
public:
|
||||
void point_servercommand(void);
|
||||
|
||||
/* overrides */
|
||||
virtual void Input(entity,string,string);
|
||||
};
|
||||
|
||||
void
|
||||
point_servercommand::point_servercommand(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
point_servercommand::Input(entity eAct, string strInput, string strData)
|
||||
{
|
||||
switch (strInput) {
|
||||
case "Command":
|
||||
localcmd(strData);
|
||||
localcmd("\n");
|
||||
break;
|
||||
default:
|
||||
super::Input(eAct, strInput, strData);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue