strange c_rotate problem

Posted By: tompo

strange c_rotate problem - 04/28/08 16:48

My code:
 Code:
var mouse_hor; 
var mouse_ver;
var sens_mouse;
define speed,skill1;
define speed_max,skill2;

while(me)
{
	mouse_hor = (pointer.x -((screen_size.x )/2)) * sens_mouse;
	mouse_ver = (pointer.y -((screen_size.y )/2)) * sens_mouse;
	if(key_w ==1)
	{if(my.speed < my.speed_max){my.speed += 0.5 *time_step;
	c_rotate (me, vector(mouse_hor *time_step, mouse_ver *time_step, 0), ignore_passable | USE_AXISR);
	c_move(me, vector(my.speed * time_step,0,0), nullvector, ignore_passable | glide);
wait(1);
}


Everything working ok... until i'm only rotating or pressing W.
If i press W while rotating i have 1513 error it this code (c_rotate).
The same is while pressing W i make a turn with mouse.

Where is the problem?!
Posted By: Uhrwerk

Re: strange c_rotate problem - 04/28/08 18:59

Did you turn off DEP?
Posted By: Captain_Kiyaku

Re: strange c_rotate problem - 04/29/08 05:35

Where do you close this if(key_w == 1) statement? There is missing a "}" as far as i can see.

 Code:
if(key_w ==1)
{if(my.speed < my.speed_max){my.speed += 0.5 *time_step;
c_rotate (me, vector(mouse_hor *time_step, mouse_ver *time_step, 0), ignore_passable | USE_AXISR);
c_move(me, vector(my.speed * time_step,0,0), nullvector, ignore_passable | glide);

Posted By: tompo

Re: strange c_rotate problem - 04/29/08 07:16

It's only ctrl-c/v mistake ;\)
Of'course i have closed statment, otherwise i will not be able to run the program ;\)
Posted By: tompo

Re: strange c_rotate problem - 04/29/08 07:33

ok... my whole code (part but the rest i've disabled in sed), so it's only working part.
Strange is... if only player is on level everything working fine, but when press N (put someone else), after couple of turns with w/s... level crashes in c_rotate (E1513)

 Code:
entity* player;
entity* enemy;
var sens_mouse; var mouse_hor; var mouse_ver;
define speed,skill1; define speed_max,skill2;

action player_action
{
	player = me; c_setminmax(me);
	my.polygon = on;
	sens_mouse = -0.02;
	my.speed_max = 10;
	while(1)
	{
		mouse_hor = (pointer.x -((screen_size.x ) /2)) * sens_mouse;
		mouse_ver = (pointer.y -((screen_size.y ) /2)) * sens_mouse;

		if(key_w ==1)
		{if(my.speed < my.speed_max){my.speed += 0.5 *time_step;}else{my.speed += 0;}}
		if(key_s ==1)
		{if(my.speed > 0){my.speed -= 0.5 *time_step;}else{my.speed =0;}}

		c_move(me, vector(my.speed * time_step,0,0), nullvector, ignore_passable | glide);
		c_rotate (me, vector(mouse_hor *time_step,mouse_ver *time_step,0), use_axisr | ignore_passable);
	wait(1);
	}
}


function enemy_fun
{
	enemy = me;
}

function next_ents
{
	ent_create("model.mdl", nullvector, enemy_fun);
}

on_n next_ents;



Mayby paste it to Your's seds and check this out, please. I'm really

EDIT: When I add ignore_models in c_rotate, everything working \:D
Strange
Posted By: vlau

Re: strange c_rotate problem - 04/30/08 06:59

I've the same experiences with A7.05 and it has been
fixed in the latest update.
Posted By: vlau

Re: strange c_rotate problem - 04/30/08 07:56

It always a good practice to search the forum
especially "Ask Conitec" and "Bug Hunt".
I've reported this bugs last year. ;\)
© 2024 lite-C Forums