Jump to content

Home

Spraypaint


GangsterAngel

Recommended Posts

Hey , im trying to make a Spraypaint thing like in CounterStrike.

right now im having a problem with structs.

the structure values seem to be diffrent in each file

 

for examle

 

cg_Draw.c

 

JKG_Sprays.Spray[1].Value1

 

seems to be diffrent than the value set in

 

JKG_Sprays.Spray[1].Value1 in cg_events.c

 

Heres the code to the structure im using.

 

//======JKG SPRAYPAINT ===============
typedef struct JKG_SprayInfo_s {
vec3_t origin;
int sprayindex;
int InUse;
} JKG_SprayInfo_t;


typedef struct JKG_GlobalSpray_s {
JKG_SprayInfo_t Spray[12];
} JKG_GlobalSpray_t;


static JKG_GlobalSpray_t	JKG_Sprays;
//====END SPRAYPAINT ==================

Link to comment
Share on other sites

I dont know how to get the coding to work, but I wanted to make a suggestion about the sprays. Custom sprays may be fun, but if you allow them in JA it will lead to all the porn sprays that can be seen and found in CS. So I would only allow like 10 different sprays that you can choose from that come with your mod.

Link to comment
Share on other sites

you do know ppl wont be able to have custom sprays because they dont exactly have the spray for 1 and unless your gonna hack the engine with a better http/ftp dl system (which i doubt it) because doing it via mod just doesnt cut it as good as if it were part of the engine. also... your just copying ideas from others and its not like it is a neccesity to have :)

Link to comment
Share on other sites

1. 'static' defined structs can't be referenced in other files. That's your problem. you need to unstatic it and then make a extern prototype reference to it in the other file before you can use it.

 

2. How are you aligning your sprays? Maybe I could help with the alignment if I knew how you're doing it.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...