News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > UnrealEngine2 Runtime > Programming

Reply
 
Thread Tools Display Modes
Old 4th Mar 2010, 07:19 AM   #1
Shadow_knight
Carpe diem!
 
Shadow_knight's Avatar
 
Join Date: Jan. 29th, 2008
Location: Prague
Posts: 48
Destroy() Pawn - delay on client?

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:
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
}
Shadow_knight is offline   Reply With Quote
Reply

Tags
client, delay, destroy(), pawn

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:44 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer