mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fix projectiles not rendering on mods based on ddnet
for some reason the client doesnt render extrainfo projectiles if the gamemode wasnt ddnet
This commit is contained in:
parent
af2d86765c
commit
5e723f6199
|
@ -73,9 +73,7 @@ void CItems::RenderProjectile(const CNetObj_Projectile *pCurrent, int ItemID)
|
|||
vec2 StartPos;
|
||||
vec2 StartVel;
|
||||
|
||||
CServerInfo Info;
|
||||
Client()->GetServerInfo(&Info);
|
||||
ExtractInfo(pCurrent, &StartPos, &StartVel, IsDDNet(&Info));
|
||||
ExtractInfo(pCurrent, &StartPos, &StartVel);
|
||||
|
||||
vec2 Pos = CalcPos(StartPos, StartVel, Curvature, Speed, Ct);
|
||||
vec2 PrevPos = CalcPos(StartPos, StartVel, Curvature, Speed, Ct-0.001f);
|
||||
|
|
|
@ -716,7 +716,7 @@ void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker, bool IsDummy)
|
|||
{
|
||||
vec2 StartPos;
|
||||
vec2 Direction;
|
||||
ExtractInfo(&Proj, &StartPos, &Direction, 1);
|
||||
ExtractInfo(&Proj, &StartPos, &Direction);
|
||||
if(CWeaponData *pCurrentData = GetWeaponData(Proj.m_StartTick))
|
||||
{
|
||||
if(CWeaponData *pMatchingData = FindWeaponData(Proj.m_StartTick))
|
||||
|
@ -2098,7 +2098,7 @@ void CLocalProjectile::Init(CGameClient *pGameClient, CWorldCore *pWorld, CColli
|
|||
m_Type = pProj->m_Type;
|
||||
m_Weapon = m_Type;
|
||||
|
||||
ExtractInfo(pProj, &m_Pos, &m_Direction, 1);
|
||||
ExtractInfo(pProj, &m_Pos, &m_Direction);
|
||||
|
||||
if(UseExtraInfo(pProj))
|
||||
{
|
||||
|
|
|
@ -12,9 +12,9 @@ bool UseExtraInfo(const CNetObj_Projectile *pProj)
|
|||
return ExtraInfoFlag;
|
||||
}
|
||||
|
||||
void ExtractInfo(const CNetObj_Projectile *pProj, vec2 *StartPos, vec2 *StartVel, bool IsDDNet)
|
||||
void ExtractInfo(const CNetObj_Projectile *pProj, vec2 *StartPos, vec2 *StartVel)
|
||||
{
|
||||
if(!UseExtraInfo(pProj) || !IsDDNet)
|
||||
if(!UseExtraInfo(pProj))
|
||||
{
|
||||
StartPos->x = pProj->m_X;
|
||||
StartPos->y = pProj->m_Y;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <base/vmath.h>
|
||||
|
||||
bool UseExtraInfo(const CNetObj_Projectile *pProj);
|
||||
void ExtractInfo(const CNetObj_Projectile *pProj, vec2 *StartPos, vec2 *StartVel, bool IsDDNet);
|
||||
void ExtractInfo(const CNetObj_Projectile *pProj, vec2 *StartPos, vec2 *StartVel);
|
||||
void ExtractExtraInfo(const CNetObj_Projectile *pProj, int *Owner, bool *Explosive, int *Bouncing, bool *Freeze);
|
||||
void SnapshotRemoveExtraInfo(unsigned char *pData);
|
||||
|
||||
|
|
Loading…
Reference in a new issue