Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

func_breakable not working properly #160

Open
squiciene opened this issue Dec 24, 2017 · 7 comments
Open

func_breakable not working properly #160

squiciene opened this issue Dec 24, 2017 · 7 comments
Assignees
Labels

Comments

@squiciene
Copy link
Collaborator

it makes the object that is breakable, invisible & no breaking sound

@q3shafe
Copy link
Owner

q3shafe commented Dec 25, 2017

I've seen this on some EF maps,

I don't think I actually added that bit of code, although I don't remember. been a long time. . If I remember correctly it worked a bit differently than ef.

Here is what we had on the breakable objects:

Mappers need to first, make it a func_door(anything will do) then press “n” and change the func_door > to func_breakable, or optionally edit the “entities.def” file and add in func_breakable, so you can just > > select it from the normal drop down list in Q3Radiant. They also need to set the life of the glass by > > > pressing “n” while selecting the entity and in the key box type in “health” and in the value box type in > whatever NUMBER of life it should have. If you dont it defaults to 5 life.

Your mapper needs to add the ifx.shader into their base/scripts directory

You will want he/she to edit the shaderlist.txt in their base/scripts directory and add at the VERY
bottom ifx

Your mapper needs to have done that so upon compile it does the lightmap and everything correctly.

Not being a level designer I don't know the specifics of what varies between ef and trep. Does the above work?

There was an old test map called glass_test which the glass doesn't break, If I remember correctly that was just to test the glass shader. Are there any stock trep maps that have breakable glass? For the life of me I can't think of one.

@q3shafe
Copy link
Owner

q3shafe commented Dec 25, 2017

Ok.. I did add it in...

At a bit of a loss why it wouldn't work though:

`oid SP_func_breakable( gentity_t *ent )
{
int health;

// Make it appear as the brush
trap_SetBrushModel( ent, ent->model );

// Lets give it 5 health if the mapper did not set its health
G_SpawnInt( "health", "0", &health );
if( health <= 0 )
health = 5;

ent->health = health;

// Let it take damage
ent->takedamage = qtrue;

// Let it know it is a breakable object
ent->s.eType = ET_BREAKABLE;

// If the mapper gave it a model, use it
if ( ent->model2 )
ent->s.modelindex2 = G_ModelIndex( ent->model2 );

ent->use = UseBreakable; // See above -Vincent

// Link all ^this^ info into the ent
trap_LinkEntity (ent);
}
`

Can you give me a test map with some breakables on it so I can test with?

@q3shafe q3shafe added the bug label Dec 25, 2017
@q3shafe q3shafe added this to the Version 0.0.25 milestone Dec 25, 2017
@squiciene
Copy link
Collaborator Author

squiciene commented Dec 25, 2017 via email

@q3shafe
Copy link
Owner

q3shafe commented Jan 3, 2018

can you email me that test map. it didn't show up here.

@squiciene
Copy link
Collaborator Author

squiciene commented Jan 4, 2018 via email

@q3shafe
Copy link
Owner

q3shafe commented Jan 4, 2018

Yep. I got the test map, haven't had a chance to hop on there yet, working long hours this week (I am a programmer/server admin). I did look at the flags.. I'll respond to that here in a minute.

@q3shafe
Copy link
Owner

q3shafe commented Mar 6, 2019

Obviously I flaked on this, when I got slammed... and totally lost what was happening... is this still an issue?

@q3shafe q3shafe removed this from the Version 0.0.30 milestone Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants