38 operator float()
const {
return m_Value / 100.0f; }
48#define MACRO_TUNING_PARAM(Name, ScriptName, Value, Description) m_##Name.Set((int)((Value)*100.0f));
50#undef MACRO_TUNING_PARAM
53#define MACRO_TUNING_PARAM(Name, ScriptName, Value, Description) CTuneParam m_##Name;
55#undef MACRO_TUNING_PARAM
61 bool Set(
int Index,
float Value);
62 bool Set(
const char *pName,
float Value);
63 bool Get(
int Index,
float *pValue)
const;
64 bool Get(
const char *pName,
float *pValue)
const;
70void StrToInts(
int *pInts,
size_t NumInts,
const char *pStr);
71bool IntsToStr(
const int *pInts,
size_t NumInts,
char *pStr,
size_t StrSize);
77 n.
x = Pos.
x + Velocity.
x * Time;
78 n.
y = Pos.
y + Velocity.
y * Time + Curvature / 10000 * (Time * Time);
105float VelocityRamp(
float Value,
float Start,
float Range,
float Curvature);
151 pCharacter =
nullptr;
231 void Tick(
bool UseInput,
bool DoDeferredTick =
true);
Definition: gamecore.h:177
int m_ActivationTick
Definition: gamecore.h:209
int m_FreezeEnd
Definition: gamecore.h:265
int m_Colliding
Definition: gamecore.h:243
vec2 m_Vel
Definition: gamecore.h:185
static bool IsSwitchActiveCb(int Number, void *pUser)
Definition: gamecore.cpp:733
bool m_EndlessHook
Definition: gamecore.h:252
std::set< int > m_AttachedPlayers
Definition: gamecore.h:192
void TickDeferred()
Definition: gamecore.cpp:460
bool m_Jetpack
Definition: gamecore.h:250
bool m_LeftWall
Definition: gamecore.h:244
vec2 m_HookPos
Definition: gamecore.h:187
void Move()
Definition: gamecore.cpp:531
bool m_Reset
Definition: gamecore.h:240
CWorldCore * m_pWorld
Definition: gamecore.h:178
int m_FreezeStart
Definition: gamecore.h:264
int m_Direction
Definition: gamecore.h:221
bool m_DeepFrozen
Definition: gamecore.h:267
bool m_LiveFrozen
Definition: gamecore.h:268
int m_Id
Definition: gamecore.h:239
vec2 m_HookDir
Definition: gamecore.h:188
static constexpr vec2 PhysicalSizeVec2()
Definition: gamecore.h:183
bool m_HammerHitDisabled
Definition: gamecore.h:254
int m_HookTick
Definition: gamecore.h:190
void SetTeamsCore(CTeamsCore *pTeams)
Definition: gamecore.cpp:728
bool m_Super
Definition: gamecore.h:259
CCollision * Collision()
Definition: gamecore.h:241
bool m_HasTelegunGun
Definition: gamecore.h:261
bool m_IsInFreeze
Definition: gamecore.h:266
int m_OldVelAmount
Definition: gamecore.h:211
bool m_LaserHitDisabled
Definition: gamecore.h:256
void Quantize()
Definition: gamecore.cpp:695
void SetHookedPlayer(int HookedPlayer)
Definition: gamecore.cpp:702
bool m_HasTelegunLaser
Definition: gamecore.h:263
int m_JumpedTotal
Definition: gamecore.h:218
bool m_GrenadeHitDisabled
Definition: gamecore.h:255
void Tick(bool UseInput, bool DoDeferredTick=true)
Definition: gamecore.cpp:191
bool m_CollisionDisabled
Definition: gamecore.h:251
bool m_HasTelegunGrenade
Definition: gamecore.h:262
bool m_ShotgunHitDisabled
Definition: gamecore.h:257
vec2 m_HookTeleBase
Definition: gamecore.h:189
void SetCoreWorld(CWorldCore *pWorld, CCollision *pCollision, CTeamsCore *pTeams)
Definition: gamecore.cpp:140
void ReadDDNet(const CNetObj_DDNetCharacter *pObjDDNet)
Definition: gamecore.cpp:639
int m_CurrentMoveTime
Definition: gamecore.h:210
int m_Angle
Definition: gamecore.h:222
bool m_Invincible
Definition: gamecore.h:260
int m_TriggeredEvents
Definition: gamecore.h:225
int HookedPlayer() const
Definition: gamecore.h:193
static constexpr float PhysicalSize()
Definition: gamecore.h:182
vec2 m_Pos
Definition: gamecore.h:184
void Reset()
Definition: gamecore.cpp:147
int m_ActiveWeapon
Definition: gamecore.h:196
bool m_HookHitDisabled
Definition: gamecore.h:258
bool m_NewHook
Definition: gamecore.h:214
CTuningParams m_Tuning
Definition: gamecore.h:269
int m_MoveRestrictions
Definition: gamecore.h:273
void Write(CNetObj_CharacterCore *pObjCore) const
Definition: gamecore.cpp:602
int m_HookState
Definition: gamecore.h:191
void Read(const CNetObj_CharacterCore *pObjCore)
Definition: gamecore.cpp:621
CNetObj_PlayerInput m_Input
Definition: gamecore.h:223
bool m_Solo
Definition: gamecore.h:249
struct CCharacterCore::@217 m_Ninja
void Init(CWorldCore *pWorld, CCollision *pCollision, CTeamsCore *pTeams=nullptr)
Definition: gamecore.cpp:128
CCollision * m_pCollision
Definition: gamecore.h:179
CTeamsCore * m_pTeams
Definition: gamecore.h:272
vec2 m_ActivationDir
Definition: gamecore.h:208
int m_Jumps
Definition: gamecore.h:219
int m_Jumped
Definition: gamecore.h:216
int m_HookedPlayer
Definition: gamecore.h:274
struct CCharacterCore::WeaponStat m_aWeapons[NUM_WEAPONS]
bool m_EndlessJump
Definition: gamecore.h:253
Definition: collision.h:34
unsigned int RandomBits()
Definition: prng.cpp:43
Definition: teamscore.h:25
Definition: gamecore.h:22
int Get() const
Definition: gamecore.h:27
void Set(int v)
Definition: gamecore.h:26
CTuneParam & operator=(float v)
Definition: gamecore.h:33
CTuneParam & operator=(int v)
Definition: gamecore.h:28
int m_Value
Definition: gamecore.h:23
Definition: gamecore.h:42
bool Set(int Index, float Value)
Definition: gamecore.cpp:21
static const char * Name(int Index)
Definition: gamecore.h:65
static const char * ms_apNames[]
Definition: gamecore.h:43
float GetWeaponFireDelay(int Weapon) const
Definition: gamecore.cpp:54
static int Num()
Definition: gamecore.h:57
CTuningParams()
Definition: gamecore.h:46
bool Get(int Index, float *pValue) const
Definition: gamecore.cpp:29
Definition: gamecore.h:145
class CCharacterCore * m_apCharacters[MAX_CLIENTS]
Definition: gamecore.h:169
void InitSwitchers(int HighestSwitchNumber)
Definition: gamecore.cpp:742
CPrng * m_pPrng
Definition: gamecore.h:170
std::vector< SSwitchers > m_vSwitchers
Definition: gamecore.h:173
CWorldCore()
Definition: gamecore.h:147
int RandomOr0(int BelowThis)
Definition: gamecore.h:156
CTuningParams m_aTuning[2]
Definition: gamecore.h:168
T x
Definition: vmath.h:19
T y
Definition: vmath.h:23
@ MAX_CLIENTS
Definition: protocol.h:88
@ INPUT_STATE_MASK
Definition: protocol.h:10
@ NUM_WEAPONS
Definition: protocol.h:1257
vec2 CalcPos(vec2 Pos, vec2 Velocity, float Curvature, float Speed, float Time)
Definition: gamecore.h:73
float VelocityRamp(float Value, float Start, float Range, float Curvature)
Definition: gamecore.cpp:121
bool IntsToStr(const int *pInts, size_t NumInts, char *pStr, size_t StrSize)
Definition: gamecore.cpp:90
T SaturatedAdd(T Min, T Max, T Current, T Modifier)
Definition: gamecore.h:83
@ HOOK_IDLE
Definition: gamecore.h:111
@ HOOK_RETRACT_END
Definition: gamecore.h:113
@ COREEVENT_HOOK_HIT_NOHOOK
Definition: gamecore.h:122
@ HOOK_FLYING
Definition: gamecore.h:114
@ HOOK_RETRACT_START
Definition: gamecore.h:112
@ COREEVENT_GROUND_JUMP
Definition: gamecore.h:117
@ COREEVENT_AIR_JUMP
Definition: gamecore.h:118
@ COREEVENT_HOOK_ATTACH_GROUND
Definition: gamecore.h:121
@ COREEVENT_HOOK_LAUNCH
Definition: gamecore.h:119
@ HOOK_RETRACTED
Definition: gamecore.h:110
@ HOOK_GRABBED
Definition: gamecore.h:115
@ COREEVENT_HOOK_RETRACT
Definition: gamecore.h:123
@ COREEVENT_HOOK_ATTACH_PLAYER
Definition: gamecore.h:120
@ SHOW_OTHERS_NOT_SET
Definition: gamecore.h:129
@ SHOW_OTHERS_ONLY_TEAM
Definition: gamecore.h:132
@ SHOW_OTHERS_OFF
Definition: gamecore.h:130
@ SHOW_OTHERS_ON
Definition: gamecore.h:131
CInputCount CountInput(int Prev, int Cur)
Definition: gamecore.h:285
void StrToInts(int *pInts, size_t NumInts, const char *pStr)
Definition: gamecore.cpp:70
Definition: gamecore.h:198
int m_Ammocost
Definition: gamecore.h:201
bool m_Got
Definition: gamecore.h:202
int m_Ammo
Definition: gamecore.h:200
int m_AmmoRegenStart
Definition: gamecore.h:199
Definition: protocol.h:435
Definition: protocol.h:513
Definition: gamecore.h:136
int m_aType[NUM_DDRACE_TEAMS]
Definition: gamecore.h:140
bool m_aStatus[NUM_DDRACE_TEAMS]
Definition: gamecore.h:137
int m_aLastUpdateTick[NUM_DDRACE_TEAMS]
Definition: gamecore.h:141
bool m_Initial
Definition: gamecore.h:138
int m_aEndTick[NUM_DDRACE_TEAMS]
Definition: gamecore.h:139
@ NUM_DDRACE_TEAMS
Definition: teamscore.h:11
vector2_base< float > vec2
Definition: vmath.h:158