Jump to content

  • Log In with Google      Sign In   
  • Create Account

Lactose!

Member Since 16 Oct 2013
Offline Last Active Today, 07:54 AM

Posts I've Made

In Topic: How To Make My Crosshair Red When Over An Enemy?

Yesterday, 05:37 PM

Can you give me something that is good for a start

A box might work. Another typical collider shape is a capsule.

Alternatively, several spheres stacked on top of each other -- if either of them are intersected, you've got a hit.


In Topic: How To Make My Crosshair Red When Over An Enemy?

Yesterday, 03:31 PM

When you shoot, how do you detect whether you hit?

I'd suggest performing the same kind of check (would guess some ray cast) and just use that.

 

If going that route, you could also cache the result, so you don't have to do another check when firing, but that might depend on your weapon (e.g. if you have a weapon with a high amount of spread, your crosshair might be red, even though bullets might miss).


In Topic: Debug With Gdb

21 July 2016 - 05:36 AM

got the previous crash without     ~Ausfaelle(); but with that I get undefined symbol and no crash. My app doesn't even load. undefined symbol: _ZN9AusfaelleD1Ev

 

~Ausfaelle(); is the declaration of a class destructor.

If you've declared it, you also need to define it (in the .cpp, like you do with the other normal class functions).

 

I would also suggest you use a debugger and step through, and see where the application crashes.

 

 

EDIT: That said, I don't see your class as needing a custom destructor. If you do not provide one, a default destructor is generated for you. You need a custom destructor in certain cases*, but I don't think your case requires one. I think something else is going on. Stepping through with a debugger seems like the best bet.

 

*Further reading here: Rule of three


In Topic: Debug With Gdb

21 July 2016 - 05:29 AM

I don't remember what I've changed

I don't have any suggestions as to what's wrong, but the quoted part seems to indicate you do not currently have any form of revision control system in place?

 

If you do not, I highly advise you to start using it, making you able to track changes you've done and not have to worry about accidentally overwriting everything you've done, etc.

Personally, I use Perforce, but GitHub, SVN also keep being mentioned by people. 


In Topic: Same Page Title On Every Page?

20 July 2016 - 03:16 PM

http://www.gamedev.net/topic/679339-web-page-browser-title/


PARTNERS