Hilarious code

A home for tales of personal killcounts and engagements between vast armadas, as well as the odd recounting of that time you saw an alien capship taking out a mining base while trying to parallel park.
Post Reply
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Hilarious code

Post 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)

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: Hilarious code

Post 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 :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
TBeholder
Elite Venturer
Elite Venturer
Posts: 753
Joined: Sat Apr 15, 2006 2:40 am
Location: chthonic safety

Re: Hilarious code

Post by TBeholder »

"Two Eyes Good, Eleven Eyes Better." -Michele Carter
Post Reply