52c3ea2
M Purple Panic, A Spectateer, M Depressed II, M The Shire, M Halloween Night, M Harvest, M Kobra 2, M Kobra, M Multeasymap, M Sunny Side Up - ddnet-mapsServer()->SnapNewItem
CNetObj_Projectile *pProj = Server()->SnapNewItem<CNetObj_Projectile>(GetID());
and when you fill the info into pProj, then all the clients know the projectile position.
void CProjectile::FillInfo(CNetObj_Projectile *pProj)
{
pProj->m_X = (int)m_Pos.x;
pProj->m_Y = (int)m_Pos.y;
pProj->m_VelX = (int)(m_Direction.x * 100.0f);
pProj->m_VelY = (int)(m_Direction.y * 100.0f);
pProj->m_StartTick = m_StartTick;
pProj->m_Type = m_Type;
}
am i getting it right ?Server()->SnapNewItem
m_StartTick
to Server()->Tick() - 3
gamecontroller.cpp
from character.cpp
:ogamecontroller::yourfunction();
?