Posted By: irchel2
Engine crasht ohne Grund - 09/30/13 15:10
Ich verwende das shooter-template t_shooter_player.c usw. Funktioniert soweit einwandfrei, aber wenn ich sterbe, moechte ich gern noch nen versuch. Also von:
(das geht wunderbar) zu:
was crasht, wenn man jumpt. So gehts wieder:
alles extrem unlogisch. Ich denke da hab ich einen Engine-Bug gefunden, vielleicht im Thread-Management; wegen snd_play? Kann man single-thread erzwingen?
Oder seh ich hier was grundsaetzliches nicht?
Code:
[...] if((jump_on) && (current_height < tshooter_disttoground)) // jumping while player's feet are placed on the floor? { if (!snd_playing (jump_handle)) // if no jumping sound is playing, play the jumping sound now jump_handle = snd_play(tshooter_jump_wav, 70, 0); vertical_speed.z = tshooter_jump * time_step; // push the player upwards } // this c_move instruction does all the job, moving the player in the direction given by horizontal_speed (forward, backward, sideways) and vertical_speed (on the z axis) c_move (my, horizontal_speed.x , vertical_speed.x, IGNORE_PASSABLE | USE_BOX | GLIDE); // player movement end wait(1); } camera.z -= 30; // bring the camera closer to the floor camera.roll = 40; // and rotate its view (the player is dead here) }
(das geht wunderbar) zu:
Code:
[...] if((jump_on) && (current_height < tshooter_disttoground)) // jumping while player's feet are placed on the floor? { if (!snd_playing (jump_handle)) // if no jumping sound is playing, play the jumping sound now jump_handle = snd_play(tshooter_jump_wav, 70, 0); vertical_speed.z = tshooter_jump * time_step; // push the player upwards } // this c_move instruction does all the job, moving the player in the direction given by horizontal_speed (forward, backward, sideways) and vertical_speed (on the z axis) c_move (my, horizontal_speed.x , vertical_speed.x, IGNORE_PASSABLE | USE_BOX | GLIDE); // player movement end wait(1); } camera.z -= 30; // bring the camera closer to the floor camera.roll = 40; // and rotate its view (the player is dead here) wait(30); //printf("unded"); camera.z += 30; camera.roll = 0; t_shooter_players_health = 100; goto restarto; //t_shooter_player(); }
was crasht, wenn man jumpt. So gehts wieder:
Code:
[...] if((jump_on) && (current_height < tshooter_disttoground)) // jumping while player's feet are placed on the floor? { // if (!snd_playing (jump_handle)) // if no jumping sound is playing, play the jumping sound now // jump_handle = snd_play(tshooter_jump_wav, 70, 0); vertical_speed.z = tshooter_jump * time_step; // push the player upwards } // this c_move instruction does all the job, moving the player in the direction given by horizontal_speed (forward, backward, sideways) and vertical_speed (on the z axis) c_move (my, horizontal_speed.x , vertical_speed.x, IGNORE_PASSABLE | USE_BOX | GLIDE); // player movement end wait(1); } camera.z -= 30; // bring the camera closer to the floor camera.roll = 40; // and rotate its view (the player is dead here) wait(30); //printf("unded"); camera.z += 30; camera.roll = 0; t_shooter_players_health = 100; goto restarto; //t_shooter_player(); }
alles extrem unlogisch. Ich denke da hab ich einen Engine-Bug gefunden, vielleicht im Thread-Management; wegen snd_play? Kann man single-thread erzwingen?
Oder seh ich hier was grundsaetzliches nicht?