Author Topic: jitspoe's .plan  (Read 272866 times)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: jitspoe's .plan
« Reply #340 on: December 10, 2007, 03:42:23 PM »
Found a bug in the downloading code that causes .tga files not to be downloaded.  Combined with the mapinfo file bug bain found, I guess I'm going to go ahead and re-package the windows version.  Not sure if it's worth increasing the build number or not.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: jitspoe's .plan
« Reply #341 on: December 13, 2007, 05:57:53 PM »
Modeled my friends stingray really quickly before I move:


Zorchenhimer

  • Autococker
  • Posts: 2614
Re: jitspoe's .plan
« Reply #342 on: December 13, 2007, 07:04:41 PM »
Oooh. Nice.

y00tz

  • Autococker
  • Posts: 2742
Re: jitspoe's .plan
« Reply #343 on: December 14, 2007, 12:18:05 AM »
Wow that looks great :D  What program(s) do you model with?

Eiii

  • Autococker
  • Posts: 4595
Re: jitspoe's .plan
« Reply #344 on: December 14, 2007, 12:54:00 AM »
I know that blue. That's the blender blue.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: jitspoe's .plan
« Reply #345 on: December 14, 2007, 01:33:12 AM »
I know that blue. That's the blender blue.

Thats what I was thinking.

y00tz

  • Autococker
  • Posts: 2742
Re: jitspoe's .plan
« Reply #346 on: December 14, 2007, 02:01:00 AM »
I recognize the Blender background, but that says nothing along the sides of the modeling software.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: jitspoe's .plan
« Reply #347 on: December 21, 2007, 12:41:00 AM »
I know that blue. That's the blender blue.
Indeed it is.  This was kind of my "learn blender and make a model in RIGHT NOW" project.  I had only tinkered before.  It's not that bad.  I could get used to it.  I really wish I was using wings3D when I got to the handle, though.  I think I'll stick with wings when it comes to more organic and mirrored models.  It just handles things a bit better and is easier to tweak with.  I also prefer the way wings handles extruding and scaling.

Anyway, on with the usual updates: As I'm sure most of you know, I was offered a job in California, and after I quit my Kodak job and packed up to move out, they retracted the offer.  I'm debating what to do now.  I don't know how realistic it is, but it would be cool if there were some commercial gain to be made from paintball2 allowing me to work on it full time.  I have a couple ideas, but I don't know if they'd generate enough revenue to live off of.  I'll post a new thread about it soon.

Waldo

  • PGP
  • Posts: 12
Re: jitspoe's .plan
« Reply #348 on: December 22, 2007, 01:43:09 AM »
good job jits.. looks nice

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: jitspoe's .plan
« Reply #349 on: January 01, 2008, 04:34:30 AM »
Well, I was going to try getting the new voting system that sk89q worked on set up, but something went quirky with the login system - or more specifically, the reverse DNS started going really slow, so I had to add another database table to cache DNS names.  Hopefully that takes care of it.

Oh, and happy new year.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: jitspoe's .plan
« Reply #350 on: January 01, 2008, 01:38:09 PM »
Curiously, is the affected code in PHP?

TOXINATED

  • PGP
  • Posts: 12
Re: jitspoe's .plan
« Reply #351 on: January 01, 2008, 01:47:33 PM »
Very stylish and modern affect too the Stingray, should be called the Stingary II

:P

KiLo

  • Autococker
  • Posts: 2086
Re: jitspoe's .plan
« Reply #352 on: January 01, 2008, 01:53:08 PM »
Very stylish and modern affect too the Stingray, should be called the Stingary II

:P

It would replace the current Stingray.

TOXINATED

  • PGP
  • Posts: 12
Re: jitspoe's .plan
« Reply #353 on: January 01, 2008, 01:55:44 PM »
Aah, okay. :)

Eiii

  • Autococker
  • Posts: 4595
Re: jitspoe's .plan
« Reply #354 on: January 01, 2008, 06:07:37 PM »
Wait, does the stingray look exactly the same as the ttracer? Or at least use the same model?

y00tz

  • Autococker
  • Posts: 2742
Re: jitspoe's .plan
« Reply #355 on: January 01, 2008, 06:50:31 PM »
Or at least, very similar, as I noticed during my vwep adventures.   To elaborate, I think the ends are different slightly... Since when I pasted one model over another in Blender they did not entirely line up near the tip of the barrel.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: jitspoe's .plan
« Reply #356 on: January 02, 2008, 05:26:42 PM »
Stingray and trracer look completely different.  Trracer is a pump gun.  Stingray is semi-auto.

I used the original stingray, not the Stingray II for the model, because I think it looks cooler.  Stingray II looks like this: http://www.newpaintball.com/images/stingray2.jpg -- it doesn't have the long, sighted  barrel.

On another note, I've put some google ads on the forums for a little test run to see if it's even worthwhile.

Eiii

  • Autococker
  • Posts: 4595
Re: jitspoe's .plan
« Reply #357 on: January 02, 2008, 07:30:58 PM »
I mean in-game. >_>

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: jitspoe's .plan
« Reply #358 on: January 02, 2008, 08:05:21 PM »
Curiously, is the affected code in PHP?
I was using the gethostbyaddr function in PHP, yes.  Now I have a ReverseDns function that caches the names in a database for 1 day:

Code: [Select]
function ReverseDns ($iptext) {
        $ipdec = ip2dec($iptext);
        $query = "SELECT `domainname` FROM `dplogin_dnscache` WHERE `ipdec` = '$ipdec' AND ADDDATE(`timestamp`, INTERVAL 1 DAY) > CURRENT_TIMESTAMP LIMIT 1;";
        $result = mysql_query($query) or DieClean("Query failed: ReverseDns(): $query");
        if (mysql_numrows($result) > 0) {
                return mysql_result($result, 0);
        } else {
                $domainname = @gethostbyaddr($iptext);
                $query = "INSERT INTO `dplogin_dnscache` (`ipdec`, `domainname`) VALUES ('$ipdec', '$domainname') ON DUPLICATE KEY UPDATE `domainname` = '$domainname', `timestamp` = CURRENT_TIMESTAMP;";
                $result = mysql_query($query) or DieClean("Query failed: ReverseDns(): $query");
        }
}


sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: jitspoe's .plan
« Reply #359 on: January 02, 2008, 08:29:50 PM »
You may want to check out the following function (from a comment on php.net/gethostbyaddr) that has a timeout for the DNS lookup. You need the sockets library installed and the IP of your DNS server.

Code: (php) [Select]
function gethostbyaddr_timeout($ip, $dns, $timeout=1000)
{
    $timeout *= 1000;
   
    // random transaction number (for routers etc to get the reply back)
    $data = rand(0, 99);
    // trim it to 2 bytes
    $data = substr($data, 0, 2);
    // request header
    $data .= "\1\0\0\1\0\0\0\0\0\0";
    // split IP up
    $bits = explode(".", $ip);
    // error checking
    if (count($bits) != 4) return "ERROR";
    // there is probably a better way to do this bit...
    // loop through each segment
    for ($x=3; $x>=0; $x--)
    {
        // needs a byte to indicate the length of each segment of the request
        switch (strlen($bits[$x]))
        {
            case 1: // 1 byte long segment
                $data .= "\1"; break;
            case 2: // 2 byte long segment
                $data .= "\2"; break;
            case 3: // 3 byte long segment
                $data .= "\3"; break;
            default: // segment is too big, invalid IP
                return "INVALID";
        }
        // and the segment itself
        $data .= $bits[$x];
    }
    // and the final bit of the request
    $data .= "\7in-addr\4arpa\0\0\x0C\0\1";
    // create UDP socket
    $handle = @fsockopen("udp://$dns", 53);
    // send our request (and store request size so we can cheat later)
    $requestsize=@fwrite($handle, $data);

    @socket_set_timeout($handle, floor($timeout/1000000), $timeout%1000000);
    // hope we get a reply
    $response = @fread($handle, 1000);
    @fclose($handle);
    if ($response == "")
        return $ip;
    // find the response type
    $type = @unpack("s", substr($response, $requestsize+2));
    if ($type[1] == 0x0C00)  // answer
    {
        // set up our variables
        $host="";
        $len = 0;
        // set our pointer at the beginning of the hostname
        // uses the request size from earlier rather than work it out
        $position=$requestsize+12;
        // reconstruct hostname
        do
        {
            // get segment size
            $len = unpack("c", substr($response, $position));
            // null terminated string, so length 0 = finished
            if ($len[1] == 0)
                // return the hostname, without the trailing .
                return substr($host, 0, strlen($host) -1);
            // add segment to our host
            $host .= substr($response, $position+1, $len[1]) . ".";
            // move pointer on to the next segment
            $position += $len[1] + 1;
        }
        while ($len != 0);
        // error - return the hostname we constructed (without the . on the end)
        return $ip;
    }
    return $ip;
}

I had the same problem on one of my login pages. gethostbyaddr kept freezing for one of my members and causing the page to timeout with a blank page.

On another note, you can use __FUNCTION__ to do:
Code: [Select]
DieClean("Query failed: ".__FUNCTION__."(): $query");