Exactly, but if you take a peek at DisplayThirdPerson(); it calls for int indexJay wrote:i've just looked at the definition of the NetPlayer:
I think Id refers to 'IdentificationNumber' of the Player. Has nothing to do with the weapons. I would say you have to add a new geActor* variable for the weapon and then use it like the pawn weapons are used...Code: Select all
class NetPlayer { public: NetPlayer(); ~NetPlayer(); void Create(char *actorname); int GetId() { return Id; } void SetId(int id) { Id = id; } void SetBaseRotation(const geVec3d &Rotation) { BaseRotation = Rotation; } void SetlocalRotation(const geVec3d &Rotation) { localRotation = Rotation; } void SetlocalTranslation(const geVec3d &Translation){ localTranslation = Translation; } public: geActor *Actor; char ActorName[128]; char Animation[128]; // changed QD 02/01/07 char PlayerName[64]; float Scale; // end change float AnimTime; int Id; geVec3d localTranslation; geVec3d localRotation; geVec3d oldTranslation; geVec3d oldRotation; geVec3d BaseRotation; private: };
CWeapon.cpp
Code: Select all
void CWeapon::DisplayThirdPerson(int index)
{
geXForm3d Xform;
geVec3d the Rotation;
geVec3d the Position;
geMotion *ActorMotion;
geMotion *ActorBMotion;
geActor *Actor = CCD->Player()->GetActor();
CCD->ActorManager()->GetRotate(Actor, &theRotation);
CCD->ActorManager()->GetPosition(Actor, &thePosition);
geActor_SetScale(WeaponD[index].PActor, WeaponD[index].PScale, WeaponD[index].PScale, WeaponD[index].PScale);
CWeapon.cppJay wrote: you might have a look at the CPawn.cpp for the weapon rendering.
that may be a start. Just a question: are the projectiles shown in the other player's views?
Code: Select all
Void CWeapon::Rendering(bool flag)
No projectiles aren't even shown in the other players view. All they see of you is your arm moving up and down when firing.
Looks like i'll probably be adding a function or 2 to Cweapon.cpp *sigh* or hacking them a lot.