OpenBOR v3.0 Build 6203 (Android/PSP/WII/WINDOWS)

Status
Not open for further replies.
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
 
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!!
 
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!!

I make some tests, removed a lot of scripts and changed configs in the main files like models.txt, levels.txt, etc... Seems to be a problem with the "boss flag" in level files because if removed, no crashes. This happens when the engine try to activate slowdown and kill all remaining alive enemies in the screen along with boss death.

I tested all the versions above 4905 and this is the last one that works correctly in my mod. I will continue testing.
 
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 ?
 
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 ?

OK msmalik good work. Now try to log energy_status and energy_status.Health_current ..
I suppose that energy_status sometime is null so when health_current access to it, it fires a  pointer exception!
BTW We need to know what is energy _status that replace health (DC update)
 
how to write to log tried printf("text"); but it did not work.

figured it out had to enable log first.
 
@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;
 
From a logical point as long as all enemies are killed at the point the boss dies it is fine. Would attack 1 or 2 make any more sense.  In my opinion time over is the best option since enemies could have defence against other types of attack.
 
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;

Nice!! Fixed, no crashes with this private windows build, thanks! However, I will do more tests because my mods are based on build 4432 and I want to use the latest.
 
@nsw25
Just made a test with 2 NPC's with the advised settings everything worked fine on latest build 6223.

@KratusGH
Glad to hear it is working for you try build 6233 link to releases page in my signature.
 
@nsw25
This is not a bug next time try to re-create the bug in another mod if you can then report it as a bug.

This is the cause of your problems.  delay data/sprites/delay.txt
Code:
name		delay
health		30
type		enemy
shadow		0
nomove		1 1
 
I changed the frame images on the delay entity to font.gif also made sure it stays on the screen permanently besides that nothing changed on delay entity.  In the below image all enemies are dead but the npc are all trying to attack the delay entity.



[attachment deleted by admin]
 
Let me test on older builds.  Tell the truth if there is no bbox on a enemy the npc's should not really attack them.
 
Status
Not open for further replies.
Back
Top Bottom