2 * Copyright (c) 2011 Rudolf Polzer
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:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
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
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 #include "interpolate.qh"
60 #include "../client/teamradar.qh"
61 #include "../client/hud.qh"
62 #include "../client/scoreboard.qh"
63 #include "../client/waypointsprites.qh"
64 #include "../client/movetypes.qh"
65 #include "../client/prandom.qh"
66 #include "../client/bgmscript.qh"
67 #include "../client/noise.qh"
68 #include "../client/tturrets.qh"
69 #include "../server/tturrets/include/turrets_early.qh"
70 #include "../client/main.qh"
71 #include "../client/vehicles/vehicles.qh"
72 #include "../common/csqcmodel_settings.qh"
78 void CSQCModel_Read(float isnew);
80 #define CSQCMODEL_IF(cond)
81 #define CSQCMODEL_ENDIF
82 #define CSQCMODEL_PROPERTY(flag,t,r,w,f) \
84 #define CSQCMODEL_PROPERTY_SCALED(flag,t,r,w,f,s,mi,ma) CSQCMODEL_PROPERTY(flag,t,r,w,f)
86 #undef CSQCMODEL_PROPERTY_SCALED
87 #undef CSQCMODEL_PROPERTY
88 #undef CSQCMODEL_ENDIF
91 entity CSQCModel_server2csqc(float pl);
92 .float csqcmodel_teleported;
94 // this is exported for custom frame animation code. Use with care.
95 // to update frames, first call this:
96 void CSQCModel_InterpolateAnimation_2To4_PreNote(float sf);
97 void CSQCModel_InterpolateAnimation_1To2_PreNote(float sf);
98 // then update frame, frame1time (and possibly frame2, frame2time, lerpfrac)
99 // if set_times is not set, caller is responsible for frame1time, frame2time, csqcmodel_lerpfractime!
100 void CSQCModel_InterpolateAnimation_2To4_Note(float sf, float set_times);
101 void CSQCModel_InterpolateAnimation_1To2_Note(float sf, float set_times);
102 // to retrieve animation state, call this
103 void CSQCModel_InterpolateAnimation_2To4_Do();
104 void CSQCModel_InterpolateAnimation_1To2_Do();
105 // will overwrite lerpfrac, lerpfrac3, lerpfrac4, and possibly clear frame*time if they are undisplayed according to lerpfracs