Page 1 of 1

Hilarious code

Posted: Sun Feb 16, 2014 3:39 pm
by ezee
I was looking at the c++ code of the engine, and i've found something very funny ( after hours to deal with svn and compilation problems ...) :

That's in sensor.cpp :

Code: Select all

if (track.HasWeaponLock())
    {
        // I am being targetted by...
        switch (track.GetType())
        {
        case Track::Type::Missile:
            return ThreatLevel::High;

        case Track::Type::CapitalShip:
            if (track.GetRelation() == Track::Relation::Enemy)
                return ThreatLevel::Medium;
            break;

        case Track::Type::Ship:
            if (track.HasTurrets())
                return ThreatLevel::Medium;

            if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
            break;
Exhaustion_gas ?
:lol: :lol: :lol:
The tracker wasn't a capital ship , nor a fighter , even not a turret ?
Nah , it was me in my ejection pod with my new wifi portable radar ...
http://youtu.be/MbXWrmQW-OE
8)

Re: Hilarious code

Posted: Sun Feb 16, 2014 4:34 pm
by loki1950
There is thread about with other examples of curious comments :lol: it might be worth preforming a bit of necromancy and resurrect it.

Enjoy the Choice :)

Re: Hilarious code

Posted: Sun Feb 16, 2014 6:15 pm
by TBeholder