UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
g_move.h
Go to the documentation of this file.
1 
5 /*
6 Copyright (C) 2002-2020 UFO: Alien Invasion.
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 
17 See the GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23 */
24 
25 #pragma once
26 
27 #include "g_local.h"
28 
29 void G_MoveCalc(int team, const Actor* movingActor, const pos3_t from, int distance);
30 void G_MoveCalcLocal(pathing_t* pt, int team, const Edict* movingActor, const pos3_t from, int distance);
31 bool G_FindPath(int team, const Edict* movingActor, const pos3_t from, const pos3_t targetPos, bool crouched = false, int maxTUs = 999999);
32 void G_ActorFall(Edict* ent);
33 int G_FillDirectionTable(dvec_t* dvtab, size_t dvtabSize, byte crouchingState, pos3_t pos);
34 pos_t G_ActorMoveLength(const Actor* actor, const pathing_t* path, const pos3_t to, bool stored);
35 void G_ClientMove(const Player& player, int visTeam, Actor* actor, const pos3_t to);
void G_ActorFall(Edict *ent)
Let an actor fall down if e.g. the func_breakable the actor was standing on was destroyed.
Definition: g_move.cpp:118
void G_MoveCalc(int team, const Actor *movingActor, const pos3_t from, int distance)
Precalculates a move table for a given team and a given starting position. This will calculate a rout...
Definition: g_move.cpp:88
bool G_FindPath(int team, const Edict *movingActor, const pos3_t from, const pos3_t targetPos, bool crouched=false, int maxTUs=999999)
Definition: g_move.cpp:107
An Edict of type Actor.
Definition: g_edict.h:348
Definition: grid.h:83
pos_t pos3_t[3]
Definition: ufotypes.h:58
Local definitions for game module.
pos_t G_ActorMoveLength(const Actor *actor, const pathing_t *path, const pos3_t to, bool stored)
Return the needed TUs to walk to a given position.
Definition: g_move.cpp:270
void G_ClientMove(const Player &player, int visTeam, Actor *actor, const pos3_t to)
Generates the client events that are send over the netchannel to move an actor.
Definition: g_move.cpp:307
short dvec_t
The direction vector tells us where the actor came from (in his previous step). The pathing table hol...
Definition: mathlib.h:236
int G_FillDirectionTable(dvec_t *dvtab, size_t dvtabSize, byte crouchingState, pos3_t pos)
Definition: g_move.cpp:244
Definition: g_edict.h:45
uint8_t byte
Definition: ufotypes.h:34
void G_MoveCalcLocal(pathing_t *pt, int team, const Edict *movingActor, const pos3_t from, int distance)
Same as G_MoveCalc, except that it uses the pathing table passed as the first param.
Definition: g_move.cpp:101
byte pos_t
Definition: ufotypes.h:57