UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
g_combat.h
Go to the documentation of this file.
1
5
6
/*
7
Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18
See the GNU General Public License for more details.
19
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24
*/
25
26
#pragma once
27
28
#include "
g_local.h
"
29
31
typedef
struct
shot_mock_s
{
32
int
enemyCount
;
33
int
friendCount
;
34
int
civilian
;
35
int
self
;
36
int
damage
;
37
bool
allow_self
;
38
39
inline
shot_mock_s
() {
40
OBJZERO
(*
this
);
41
}
42
}
shot_mock_t
;
43
44
int
G_ApplyProtection
(
const
Edict
* target,
const
byte
dmgWeight,
int
damage);
45
void
G_CheckDeathOrKnockout
(
Actor
* target,
Actor
* attacker,
const
fireDef_t
* fd,
int
damage);
46
bool
G_ClientShoot
(
const
Player& player,
Actor
* actor,
const
pos3_t
at,
shoot_types_t
shootType,
fireDefIndex_t
firemode,
shot_mock_t
* mock,
bool
allowReaction,
int
z_align);
47
void
G_CalcEffectiveSpread
(
const
Actor
* ent,
const
fireDef_t
* fd,
vec2_t
effSpread);
Actor
An Edict of type Actor.
Definition
g_edict.h:348
Edict
Definition
g_edict.h:45
G_ApplyProtection
int G_ApplyProtection(const Edict *target, const byte dmgWeight, int damage)
Reduces damage by armour and natural protection.
Definition
g_combat.cpp:362
G_CheckDeathOrKnockout
void G_CheckDeathOrKnockout(Actor *target, Actor *attacker, const fireDef_t *fd, int damage)
Definition
g_combat.cpp:499
G_CalcEffectiveSpread
void G_CalcEffectiveSpread(const Actor *ent, const fireDef_t *fd, vec2_t effSpread)
Calculate the effective spread for the given actor and firemode.
Definition
g_combat.cpp:671
G_ClientShoot
bool G_ClientShoot(const Player &player, Actor *actor, const pos3_t at, shoot_types_t shootType, fireDefIndex_t firemode, shot_mock_t *mock, bool allowReaction, int z_align)
Setup for shooting, either real or mock.
Definition
g_combat.cpp:1183
g_local.h
Local definitions for game module.
fireDefIndex_t
int32_t fireDefIndex_t
Definition
inv_shared.h:78
shoot_types_t
int32_t shoot_types_t
Available shoot types - also see the ST_ constants.
Definition
q_shared.h:206
OBJZERO
#define OBJZERO(obj)
Definition
shared.h:178
fireDef_t
this is a fire definition for our weapons/ammo
Definition
inv_shared.h:110
shot_mock_t
used in shot probability calculations (pseudo shots)
Definition
g_combat.h:31
shot_mock_t::self
int self
Definition
g_combat.h:35
shot_mock_t::shot_mock_s
shot_mock_s()
Definition
g_combat.h:39
shot_mock_t::damage
int damage
Definition
g_combat.h:36
shot_mock_t::friendCount
int friendCount
Definition
g_combat.h:33
shot_mock_t::allow_self
bool allow_self
Definition
g_combat.h:37
shot_mock_t::civilian
int civilian
Definition
g_combat.h:34
shot_mock_t::enemyCount
int enemyCount
Definition
g_combat.h:32
pos3_t
pos_t pos3_t[3]
Definition
ufotypes.h:58
vec2_t
vec_t vec2_t[2]
Definition
ufotypes.h:38
src
game
g_combat.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0