Re: [hlcoders] Documentation

2005-01-27 Thread Markus Martin
Hello,

I think the most important point in this discussion was completely ignored..

Aren't there any 'code analyzers'? I once had a shareware program that
could read my code, and make a sort of flowchart of it. I bet there are
way more advanced stuff out there that can easily dump out a visualized
class hierarchial structure. Or else, you could try to write your own
code analyzing program. (which *could* take less time then doing the
entire source yourself..)

Try something like Doxygen, or a number of other automated source
analyzers which are most likely available on SourceForge.net. And at
no cost..

Doxygen:  http://www.stack.nl/~dimitri/doxygen/

Greetings,
-Markus

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Sharing cvars between the client and server

2005-01-24 Thread Markus Martin
Hello,

I tried setting the flag before my original email. You are probably
referring to FCVAR_REPLICATED. Did not work though. Try declaring the
same cvar on client and server, and see what happens. The console
prints something similiar to sv_foo not allowed in server.dll. All
the cvar flags are quite nicely documented in the SDK docs on VERC.

However, I did figure out a solution. What I was trying to do was
declare a pointer to particular cvars using the cvar interface's
FindCvar function: cvar-FindCvar( sv_foo );

The trouble was that I was declaring my pointers globally where the
cvars normal declaration goes. So, I simply moved these variables into
the class declaration where I intended to use them. Works just fine.

I am a little worried about what might happen if for some reason the
cvar were not to be found. My pointer might get a null value and you
should know where that might lead.. So I may make a little wrapper
class to search for the cvar I want, but make certain I am getting a
safe value back in case something goes wrong.

Hope that helps someone who might be doing something similiar!

Greetings,
-Markus


On Tue, 25 Jan 2005 11:28:49 +1000, Luke Graham [EMAIL PROTECTED] wrote:
 I dont understand the last 3/4's of your post but theres a flag you
 can pass when you create a CVAR to make it shared between client and
 server. Sorry, dont remember its name right now. Just make the CVAR
 once in a file thats compiled into both, and give it that flag.


 On Sun, 23 Jan 2005 03:27:49 -0700, Markus Martin [EMAIL PROTECTED] wrote:
  Hi,
 
  I am trying to share the same console variables between the client and
  server in a file that is compiled into both dlls. What I do in my
  shared file is create a pointer to the cvars like so:
  ConVar *melee_dmg = cvar-FindVar( melee_dmg );
 
  And this works fine for both client and server. Now, the actual cvar
  is defined in the normal way in a seperate file, but it is only
  compiled into the server. Compiling a cvar into both dlls causes one
  to override the other, and thus the cvar(s) do not work.
 
  This seems like perfectly sound code as all goes well until actually
  loading the dlls hot off the compiler. For some reason when I load my
  mod, the Half-Life2 dlls are loaded instead. I am thinking the engine
  decides something is wrong with my dlls, but I find this rather
  irritating, as I would prefer a crash that I could perhaps debug.. All
  this happens without any error output whatsoever.
 
  I assume that on the client, FindVar() can find the cvars. Perhaps
  this is not the case. It is not really essential that the client knows
  the value of the cvar, except maybe for flow control later on down the
  road.. However, I am trying to avoid #ifdef hell as much as possible
  as this is a shared file.
 
  Greetings,
  -Markus
 
  ___
  To unsubscribe, edit your list preferences, or view the list archives, 
  please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 

 ___
 To unsubscribe, edit your list preferences, or view the list archives, please 
 visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



[hlcoders] Sharing cvars between the client and server

2005-01-23 Thread Markus Martin
Hi,

I am trying to share the same console variables between the client and
server in a file that is compiled into both dlls. What I do in my
shared file is create a pointer to the cvars like so:
ConVar *melee_dmg = cvar-FindVar( melee_dmg );

And this works fine for both client and server. Now, the actual cvar
is defined in the normal way in a seperate file, but it is only
compiled into the server. Compiling a cvar into both dlls causes one
to override the other, and thus the cvar(s) do not work.

This seems like perfectly sound code as all goes well until actually
loading the dlls hot off the compiler. For some reason when I load my
mod, the Half-Life2 dlls are loaded instead. I am thinking the engine
decides something is wrong with my dlls, but I find this rather
irritating, as I would prefer a crash that I could perhaps debug.. All
this happens without any error output whatsoever.

I assume that on the client, FindVar() can find the cvars. Perhaps
this is not the case. It is not really essential that the client knows
the value of the cvar, except maybe for flow control later on down the
road.. However, I am trying to avoid #ifdef hell as much as possible
as this is a shared file.

Greetings,
-Markus

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] sk_plr_dmg_pistol

2005-01-22 Thread Markus Martin
Hi,

Singleplayer weapon damage is setup in cfg/skill.cfg. Or you can set
the value in any cfg file that gets run before the game loads, really.

Hope that helps.
-Markus

  ---Original Message---
 
  From: hlcoders@list.valvesoftware.com
  Date: 01/22/05 23:03:21
  To: hlcoders@list.valvesoftware.com
  Subject: Re: [hlcoders] sk_plr_dmg_pistol
 
  You can set the damage for a bullet in that weapon's script file.
 
  On Sat, 22 Jan 2005 22:55:46 -0500, David Nelson [EMAIL PROTECTED]
  wrote:
   I setup my own ammo in hl2_gamerules and setup the CVar
 sk_plr_dmg_pistol.
   But where is the cvar assigned a value of how much damage to do?  Is
 this
   done with the DMG_BULLET?  Or can you set a value to it?
  
   Thanks,
   David

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



[hlcoders] Climbing Ladders

2005-01-10 Thread Markus Martin
Hello,

Has anyone else noticed an inability to climb ladders in the MP SDK
code? At first I thought this was because the CSDKGameMovement class
declared its own constructor without calling the base class
constructor and something was not being initialized, but this does not
help.

I've been digging around in game_movement.cpp. It appears that in
CGameMovement::LadderMove() only the top bit is being executed before
the traceline. I spit a message to the console right after this
traceline, but I only see it a few times at the beginning of a map,
and then never again. I will look into this more later, but school has
now started up (so I am stuck with java right now ;( ).

Any thoughts?

Greetings,
-Markus

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



[hlcoders] SERVERCLASS vs NETWORKCLASS

2005-01-07 Thread Markus Martin
Hello,

I have been porting some HL2 weapons to the multiplayer mod I am
working on, and I am curious to know the difference between the
SERVERCLASS and NETWORKCLASS entities.

There seems to be a significant difference. The SDK weapons use the
DECLARE_NETWORKCLASS() and DECLARE_PREDICTABLE() macros, then that
source file is compiled into both the server and client. The HL2
weapons on the other hand use the DECLARE_SERVERCLASS() macro and a
data table.

Both these methods seem 'networked for multiplayer', and in the
Entity Networking doc only SERVERCLASS is discussed. What is the
preferred method for multiplayer and why?

Greetings,
-Markus

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders