[NeoStats-Devel] [Commits] r16 - trunk
| Newsgroups | gmane.comp.neostats.devel |
|---|---|
| Message-ID | <[email protected]> |
Author: Mark
Date: Fri May 6 07:06:30 2005
New Revision: 16
Modified:
trunk/channel.c
Log:
ns_calloc clears all allocated RAM to 0 so no point doing it again in code
Modified: trunk/channel.c
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Fri May 6 07:06:30 2005
@@ -85,22 +85,10 @@
int i2;
gd = ns_calloc(sizeof(GameData));
- gd->playercount = 0;
gd->gamestatus = YS_GAME_STOPPED;
gd->timer = me.now;
- gd->currentplayer = 0;
- gd->currentroll = 0;
- gd->currenthand = 0;
- for (i = 0 ; i < 5 ; i++) {
- gd->dice[i] = 0;
- }
for (i = 0 ; i < YS_MAX_PLAYERS ; i++) {
gd->pd[i] = ns_calloc(sizeof(Players));
- gd->pd[i]->u = NULL;
- gd->pd[i]->score = 0;
- for (i2 = 0 ; i2 < 15 ; i2++) {
- gd->pd[i]->hand[i2] = 0;
- }
}
SetChannelModValue(c, gd);
lnode_create_append(gamelist, c);