File: netlighting.c

package info (click to toggle)
xshipwars 1.32-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 17,176 kB
  • ctags: 6,357
  • sloc: ansic: 157,152; makefile: 226; sh: 75
file content (49 lines) | stat: -rw-r--r-- 998 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "swserv.h"



int NetHandleLighting(int condescriptor, char *arg)
{
        long object_num, con_object_num;
	int lighting;	/* Real type is xswo_lighting_t. */
        xsw_object_struct *obj_ptr;


        con_object_num = connection[condescriptor]->object_num;
        if(DBIsObjectGarbage(con_object_num))
            return(-1);
        else
            obj_ptr = xsw_object[con_object_num];

        /*
         *	SWEXTCMD_SETLIGHTING format:
         *
         *      object_num lighting
         */
        sscanf(arg, "%ld %i",
                &object_num,
                &lighting   
        );


        /* Can only set connection's object. */
        if(object_num != con_object_num)
            return(-3);


        /* Set lighting. */
        obj_ptr->lighting = lighting;


        /* Set next object values update to now so it gets updated now. */
        next.object_values = cur_millitime;


        return(0);
}


int NetSendLighting(int condescriptor)
{
	return(0);
}