Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Odd behavior with copy file

Author
Message
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th Dec 2011 21:02 Edited at: 19th Dec 2011 21:03
Hey guys!


I came across this very strange bug and thought I'd share it with you. I'm working on a level editor, and when you load a file in the editor it will copy the file you selected to a local folder and then load it from there. What happened was the objects you wanted to load loaded with textures (they shouldn't because the textures aren't in the same folder), and some of the limbs from the object were missing. If I deleted and re-loaded the object, it would work, but it was still textured.

So I wanted to get to the bottom of this. Here is the code I used, which is extracted from my level editor and dumbed down a bit. You'll need to download the attached project folder to load the object.



So why does the object load with textures?

The reason is because the directory is still set to where the textures are located using set dir. If you add the line set dir OriginalDirectory$ just before you load the object, it won't be textured.

Why are some limbs missing?

They aren't missing, they are just black. And because I used set object transparency obj , 2, they are completely transparent.

Why are some limbs black and other white? I have no idea...

TheComet

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Dec 2011 00:25
Is this a trick post?

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 20th Dec 2011 01:00
i don't see a bug here

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Dec 2011 07:26
So wait, you're both telling me that the example above loads the object without textures the second time?

TheComet

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 20th Dec 2011 10:11
Quote: "So wait, you're both telling me that the example above loads the object without textures the second time?"

No, but you didn't explain why do you expect it to work like that. If textures were referenced with global paths your expectations would be wrong. After downloading your example i can see textures are referenced with local paths so this indeed looks like a bug

Login to post a reply

Server time is: 2026-07-11 12:02:18
Your offset time is: 2026-07-11 12:02:18