Moved class item_pickup definition to a higher scope, so the weapons
can manipulate pickup related things within their own source file.
This commit is contained in:
parent
9fec86e295
commit
af7820def4
7 changed files with 35 additions and 15 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "gamerules.h"
|
||||
#include "money.h"
|
||||
#include "../valve/items.h"
|
||||
|
||||
var int g_cstrike_buying = 0;
|
||||
var float g_cstrike_bombradius = 500;
|
||||
|
|
|
@ -16,3 +16,4 @@
|
|||
|
||||
#include "../valve/gamerules.h"
|
||||
#include "gamerules_ctf.h"
|
||||
#include "../valve/items.h"
|
||||
|
|
|
@ -15,3 +15,4 @@
|
|||
*/
|
||||
|
||||
#include "gamerules.h"
|
||||
#include "../valve/items.h"
|
||||
|
|
|
@ -15,3 +15,4 @@
|
|||
*/
|
||||
|
||||
#include "gamerules.h"
|
||||
#include "../valve/items.h"
|
||||
|
|
|
@ -15,3 +15,4 @@
|
|||
*/
|
||||
|
||||
#include "gamerules.h"
|
||||
#include "items.h"
|
||||
|
|
|
@ -14,21 +14,6 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* PICKUP ITEMS */
|
||||
class item_pickup:CBaseTrigger
|
||||
{
|
||||
int m_bFloating;
|
||||
int m_iClip;
|
||||
int m_iWasDropped;
|
||||
int id;
|
||||
void(void) item_pickup;
|
||||
|
||||
virtual void(void) touch;
|
||||
virtual void(int i) setitem;
|
||||
virtual void(void) Respawn;
|
||||
virtual void(int) SetFloating;
|
||||
};
|
||||
|
||||
void item_pickup::touch(void)
|
||||
{
|
||||
if (other.classname != "player") {
|
||||
|
|
30
src/server/valve/items.h
Normal file
30
src/server/valve/items.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 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.
|
||||
*/
|
||||
|
||||
/* PICKUP ITEMS */
|
||||
class item_pickup:CBaseTrigger
|
||||
{
|
||||
int m_bFloating;
|
||||
int m_iClip;
|
||||
int m_iWasDropped;
|
||||
int id;
|
||||
void(void) item_pickup;
|
||||
|
||||
virtual void(void) touch;
|
||||
virtual void(int i) setitem;
|
||||
virtual void(void) Respawn;
|
||||
virtual void(int) SetFloating;
|
||||
};
|
Loading…
Reference in a new issue