Hi,
I stumbled upon a following issue:
I have my custom Pawn in the level and at some point I respawn the Pawn on a different location.
The thing is that although the Pawn on the original location is destroyed, you can still see him there (it seems like the Pawn's mesh was not destroyed, or it was not replicated correctly on client). After some time the old Pawn dissapears (I noticed, when I walk behined a corner and wait there for few secs and return back, the old Pawn mesh dissapears.)
Currently I don't know why this is happening. Any ideas?
How I am destroying the Pawn:
Code of my pawn:
I stumbled upon a following issue:
I have my custom Pawn in the level and at some point I respawn the Pawn on a different location.
The thing is that although the Pawn on the original location is destroyed, you can still see him there (it seems like the Pawn's mesh was not destroyed, or it was not replicated correctly on client). After some time the old Pawn dissapears (I noticed, when I walk behined a corner and wait there for few secs and return back, the old Pawn mesh dissapears.)
Currently I don't know why this is happening. Any ideas?
How I am destroying the Pawn:
Code:
simulated function RemoteDestroyPawn() {
if ( Pawn != None )
{
Pawn.RemoteRole = ROLE_SimulatedProxy;
Pawn.Died(self, class'DamageType', Pawn.Location);
Pawn.Destroy();
}
}
Code of my pawn:
Code:
class PogamutMale extends GBPawn
config(GBEmohawk);
simulated event Destroyed() {
//destroying shadow
if (Shadow != none)
Shadow.Destroy();
super.Destroyed();
}
simulated event PostBeginPlay()
{
Super.PostBeginPlay();
LinkMesh(Mesh(DynamicLoadObject("_PGA-EmoboySized.emoboy_mesh", class'Mesh')),false);
Skins[0]=Texture(DynamicLoadObject("_PGTX-Emoboy.emoboy_skin", class'Texture'));
Skins[1]=Texture(DynamicLoadObject("_PGTX-Emoboy.emoboy_clothes_01", class'Texture'));
}
defaultproperties
{
Mesh=Mesh'_PGA-EmoboySized.emoboy_mesh'
IdleAnim="stand_normal"
MovementAnims[0]="run_normal"
MovementAnims[1]="run_normal"
MovementAnims[2]="run_normal"
MovementAnims[3]="run_normal"
TurnLeftAnim="walk_loop"
TurnRightAnim="walk_loop"
bPhysicsAnimUpdate=true
bCanCrouch=false
GroundSpeed=440
Skins(0)=Texture'_PGTX-Emoboy.emoboy_skin'
Skins(1)=Texture'_PGTX-Emoboy.emoboy_clothes_01'
bActorShadows=true
BaseEyeHeight=128
}