Raised This Month: $12 Target: $400
 3% 

Creating/spawning entities and props


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
imported_IJs
New Member
Join Date: Oct 2005
Old 10-30-2005 , 06:57   Creating/spawning entities and props
Reply With Quote #1

Well I managed to spawn and create various prop and normal entities.

The target system's Linux, some of you already know why.

Here's the complete guide:
http://devwiki.lame-cs.nl/index.php/...2_%28Server%29

And here's a demonstration video:
http://www.lame-cs.nl/dell_attempt_1.avi

Have fun
__________________
Proud developer of the best GTA3, GTA:VC and GTA:SA multiplayer modification
Multi Theft Auto
imported_IJs is offline
BAILOPAN
Join Date: Jan 2004
Old 10-30-2005 , 08:37  
Reply With Quote #2

Interesting, it's a nice article in its own right for showing some details about entities (I don't really know too much about the HL2 with regards to the "enginey" stuff).

However, I'd like to make a few points. I assume what you're talking about is the fact that Linux binaries have lazy loading. For those who don't know, on Linux, symbols can be resolved at runtime rather than at compile time. In Windows the import table must have a known mapping at compile time. The laziest Windows gets in this regard is that DLLs can have .lib files, which allows no mapping at compile time, and at run time Windows will try to load the corresponding DLL to resolve the imports (which will fail if the imports or DLL are not found).

In my opinion, Linux dynamic linking is a hack, and one that causes many problems. Ultimately in this scenario it means you're relying on the fact that the symbol table is completely intact; something Valve could easily change. The fact that Linux will randomly attach one library's import to another library's completely unrelated but exposed symbol is nightmarish.

A more cross-platform compatible approach would be to do signature/byte pattern scanning, like NemoD does. Granted, it's a lot more work, but it's almost fail-safe.

Lastly, I would write that GCC-3.4 be required as a minimum. They're not ABI compatible and I've had plugins crash because they mismatch with SourceMM's compiled version.

If it does indeed segfault, I would throw it in a debugger. Because the symbol table is intact on Linux builds, you might be able to see why.

(BTW! - God forbid if a mod ever deviate from the base SDK. This sort of thing would surely fall to pieces, which is quite unfortunate from independent modders' point of view).
__________________
egg
BAILOPAN is offline
imported_IJs
New Member
Join Date: Oct 2005
Old 10-30-2005 , 09:45  
Reply With Quote #3

Thanks for the comments.

I agree not everything is 100% accurate.

As far as I know it's segfaulting after a while, but at the time I thought it was more important to document the whole thing instead of fixing problems.

Heh, I might as well add a disclaimer on top

Remember it's a wiki so you can add/change whatever you want.
__________________
Proud developer of the best GTA3, GTA:VC and GTA:SA multiplayer modification
Multi Theft Auto
imported_IJs is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 10-30-2005 , 11:43  
Reply With Quote #4

I was creating phys props with by sigscanning for CreateEntityByName(), but they never responded properly when shot. I think I missed a couple of the VPHYSICS functions I should have used.

I'll check out your code and see what I missed. Thanks for posting the info.
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
imported_IJs
New Member
Join Date: Oct 2005
Old 10-30-2005 , 13:47  
Reply With Quote #5

Make sure you create them as prop_physics_multiplayer, and link the entity to the CBreakableProp class.
__________________
Proud developer of the best GTA3, GTA:VC and GTA:SA multiplayer modification
Multi Theft Auto
imported_IJs is offline
za_bullet
Junior Member
Join Date: Nov 2005
Old 11-24-2005 , 06:05  
Reply With Quote #6

Anyone got a tutorial one how to get this done on Windows?

D.
za_bullet is offline
Send a message via AIM to za_bullet
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode