mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
Merge pull request #33045 from nekomatata/cpu-particle-uninitialized-member
Fixed emitting not initialized correctly in cpu particles 2d/3d
This commit is contained in:
commit
66ccdebbb3
@ -260,8 +260,7 @@ void CPUParticles2D::restart() {
|
||||
inactive_time = 0;
|
||||
frame_remainder = 0;
|
||||
cycle = 0;
|
||||
|
||||
set_emitting(true);
|
||||
emitting = false;
|
||||
|
||||
{
|
||||
int pc = particles.size();
|
||||
@ -271,6 +270,8 @@ void CPUParticles2D::restart() {
|
||||
w[i].active = false;
|
||||
}
|
||||
}
|
||||
|
||||
set_emitting(true);
|
||||
}
|
||||
|
||||
void CPUParticles2D::set_direction(Vector2 p_direction) {
|
||||
@ -1422,6 +1423,7 @@ CPUParticles2D::CPUParticles2D() {
|
||||
frame_remainder = 0;
|
||||
cycle = 0;
|
||||
redraw = false;
|
||||
emitting = false;
|
||||
|
||||
mesh = VisualServer::get_singleton()->mesh_create();
|
||||
multimesh = VisualServer::get_singleton()->multimesh_create();
|
||||
|
@ -240,8 +240,7 @@ void CPUParticles::restart() {
|
||||
inactive_time = 0;
|
||||
frame_remainder = 0;
|
||||
cycle = 0;
|
||||
|
||||
set_emitting(true);
|
||||
emitting = false;
|
||||
|
||||
{
|
||||
int pc = particles.size();
|
||||
@ -251,6 +250,8 @@ void CPUParticles::restart() {
|
||||
w[i].active = false;
|
||||
}
|
||||
}
|
||||
|
||||
set_emitting(true);
|
||||
}
|
||||
|
||||
void CPUParticles::set_direction(Vector3 p_direction) {
|
||||
@ -1494,6 +1495,7 @@ CPUParticles::CPUParticles() {
|
||||
frame_remainder = 0;
|
||||
cycle = 0;
|
||||
redraw = false;
|
||||
emitting = false;
|
||||
|
||||
set_notify_transform(true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user