]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/csqcmodellib/interpolate.qh
9dd1cc6d1cd81229d0634ca97ef24c2f1356e04c
[xonotic/xonotic-data.pk3dir.git] / qcsrc / csqcmodellib / interpolate.qh
1 /*
2  * Copyright (c) 2011 Rudolf Polzer
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to
6  * deal in the Software without restriction, including without limitation the
7  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8  * sell copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20  * IN THE SOFTWARE.
21  */
22 #ifndef INTERPOLATE_H
23 #define INTERPOLATE_H
24
25 #if defined(CSQC)
26     #include "../common/util-pre.qh"
27     #include "../client/sys-pre.qh"
28     #include "../dpdefs/csprogsdefs.qh"
29     #include "../client/sys-post.qh"
30     #include "../client/defs.qh"
31     #include "../dpdefs/keycodes.qh"
32     #include "../common/constants.qh"
33     #include "../common/stats.qh"
34     #include "../warpzonelib/anglestransform.qh"
35     #include "../warpzonelib/mathlib.qh"
36     #include "../warpzonelib/common.qh"
37     #include "../warpzonelib/client.qh"
38     #include "../common/playerstats.qh"
39     #include "../common/teams.qh"
40     #include "../common/util.qh"
41     #include "../common/nades.qh"
42     #include "../common/buffs.qh"
43     #include "../common/test.qh"
44     #include "../common/counting.qh"
45     #include "../common/weapons/weapons.qh"
46     #include "../common/mapinfo.qh"
47     #include "../common/command/markup.qh"
48     #include "../common/command/rpn.qh"
49     #include "../common/command/generic.qh"
50     #include "../common/command/shared_defs.qh"
51     #include "../common/urllib.qh"
52     #include "../common/animdecide.qh"
53     #include "../client/command/cl_cmd.qh"
54     #include "../common/monsters/monsters.qh"
55     #include "../client/autocvars.qh"
56     #include "../common/notifications.qh"
57     #include "../common/deathtypes.qh"
58     #include "../client/damage.qh"
59 #elif defined(MENUQC)
60 #elif defined(SVQC)
61 #endif
62
63 .int iflags;
64 const int IFLAG_VELOCITY = 1;
65 const int IFLAG_ANGLES = 2;
66 const int IFLAG_AUTOANGLES = 4;
67 const int IFLAG_VALID = 8;
68 const int IFLAG_PREVALID = 16;
69 const int IFLAG_TELEPORTED = 32;
70 const int IFLAG_AUTOVELOCITY = 64;
71 const int IFLAG_V_ANGLE = 128;
72 const int IFLAG_V_ANGLE_X = 256;
73 const int IFLAG_ORIGIN = 512;
74 #define IFLAG_INTERNALMASK (IFLAG_VALID | IFLAG_PREVALID)
75
76 // call this BEFORE reading an entity update
77 void InterpolateOrigin_Undo();
78
79 // call this AFTER receiving an entity update
80 void InterpolateOrigin_Note();
81
82 // call this when the entity got teleported, before InterpolateOrigin_Note
83 void InterpolateOrigin_Reset();
84
85 // call this BEFORE drawing
86 void InterpolateOrigin_Do();
87
88 // in case we interpolate that:
89 .vector v_angle;
90 #endif