spawn with weapon bug

ABK

Well-known member
I have jumpframe in respawn animation of player without weapon and when im using setweap in stage txt to start with weapon then respawn is somehow applying jumpframe from original model which is very weird, i removed jumpframe from respawn of noweapon player and it doesnt have that problem.
I dont know why it happens , like if weaponmodel is not applied fast enough by setweap or some mixup is happening with original respawn.
I have modelflag 1.
It happens if i have jumpframe on frame 0, if its on frame 1 it works ok, i fixed it by adding  one frame but its still a bug.
I think frame 0 bug is very serious one and engine is handicapped because of it, scripts very often wont work if theyre set to work on frame 0 which is simply first frame, so for example if i want to bind entity i will see blink because i have to spawn on frame1 to avoid frame 0 bug.
 
@bWWd - I'm not sure this is helpful for you anymore...

But the respawn thing was a problem in DOOM mod.  When switching weapons it would play RESPAWN animation.  Which looked really bad.

My solution was finally this, create a file respawn1.c which in this example makes the player change animation to FOLLOW1 when he REspawns.  You must delete or rename ANIM RESPAWN for this to work. 

I never use respawn anim anymore now.


respawn1.c

Put in DATA folder

Code:
void main(){
	int player = getlocalvar("player");
	void self = getplayerproperty(player, "ent");
	{
	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"), 1);
	}
}

 
bWWd said:

The frame 0 thing as it were is a problem, but technically I'm not sure if we can call it a bug so much as a quirk of the engine design. OpenBOR was built to execute actions on frames, not frames on actions. Meaning until frame 0 occurs there might not be any part of the entity that yet exists for the script to execute on. I'll take a look at the code to make sure - hopefully I'm wrong and it's just a simple oversight. We'll see. Maybe Plombo might have some ideas too.

DC
 
Back
Top Bottom