KratusGH said:. . .
What was the last working build before this bug ?
KratusGH said:. . .
KratusGH said:I downloaded some versions to make tests and the last working build is 4905. All my projects are based on version 4432 and I tried 6212 because of new plug and play feature
White Dragon said:KratusGH said:I downloaded some versions to make tests and the last working build is 4905. All my projects are based on version 4432 and I tried 6212 because of new plug and play feature
Please tests other version to help msmalik an please check if your script is wrong.
I tested a game and latyest build works well!!
// Called when boss dies
void kill_all_enemies()
{
int i;
s_collision_attack attack;
entity *tmpself = NULL;
attack = emptyattack;
attack.attack_type = max_attack_types;
attack.dropv.y = default_model_dropv.y;
attack.dropv.x = default_model_dropv.x;
attack.dropv.z = default_model_dropv.z;
tmpself = self;
for(i = 0; i < ent_max; i++)
{
if( ent_list[i]->exists
&& ent_list[i]->energy_status.health_current > 0
&& (ent_list[i]->modeldata.type & TYPE_ENEMY)
&& ent_list[i]->takedamage)
{
self = ent_list[i];
attack.attack_force = self->energy_status.health_current;
self->takedamage(tmpself, &attack, 0);
self->dead = 1;
}
}
self = tmpself;
}
msmalik681 said:I believe the crash is related to a function.
openbor.c
Code:// Called when boss dies void kill_all_enemies() { int i; s_collision_attack attack; entity *tmpself = NULL; attack = emptyattack; attack.attack_type = max_attack_types; attack.dropv.y = default_model_dropv.y; attack.dropv.x = default_model_dropv.x; attack.dropv.z = default_model_dropv.z; tmpself = self; for(i = 0; i < ent_max; i++) { if( ent_list[i]->exists && ent_list[i]->energy_status.health_current > 0 && (ent_list[i]->modeldata.type & TYPE_ENEMY) && ent_list[i]->takedamage) { self = ent_list[i]; attack.attack_force = self->energy_status.health_current; self->takedamage(tmpself, &attack, 0); self->dead = 1; } } self = tmpself; }
When I remove this function with comments there is no crash but then level can not end. the only thing that changed with this function since 4905 is "->health" is now "->energy_status.health_current" I am not sure what to do ?
// Called when boss dies
void kill_all_enemies()
{
int i;
s_collision_attack attack;
entity *tmpself = NULL;
attack = emptyattack;
attack.attack_type = ATK_TIMEOVER;
//attack.attack_type = max_attack_types;
attack.dropv.y = default_model_dropv.y;
attack.dropv.x = default_model_dropv.x;
attack.dropv.z = default_model_dropv.z;
msmalik681 said:@KratusGH
please test this private windows build: http://www.mediafire.com/file/c757l0pof98s3wf/OpenBOR%20test.zip
I changed the attack type to time over work in my test.
Code:// Called when boss dies void kill_all_enemies() { int i; s_collision_attack attack; entity *tmpself = NULL; attack = emptyattack; attack.attack_type = ATK_TIMEOVER; //attack.attack_type = max_attack_types; attack.dropv.y = default_model_dropv.y; attack.dropv.x = default_model_dropv.x; attack.dropv.z = default_model_dropv.z;
name delay
health 30
type enemy
shadow 0
nomove 1 1