This commit is contained in:
Stefan `Sec` Zehl 2011-08-03 23:12:43 +02:00
parent 3067880746
commit 8b93635425
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,7 @@
#include "basic/random.h" #include "basic/random.h"
char meshgen=0; // Generation char meshgen=0; // Generation
char meshincctr=0; // Generation char meshincctr=0;
MPKT meshbuffer[MESHBUFSIZE]; MPKT meshbuffer[MESHBUFSIZE];
uint32_t const meshkey[4] = { uint32_t const meshkey[4] = {
@ -45,6 +45,8 @@ MPKT * meshGetMessage(uint8_t type){
if(meshbuffer[free].flags==MF_FREE){ if(meshbuffer[free].flags==MF_FREE){
memset(&meshbuffer[free],0,sizeof(MPKT)); memset(&meshbuffer[free],0,sizeof(MPKT));
MO_TYPE_set(meshbuffer[free].pkt,type); MO_TYPE_set(meshbuffer[free].pkt,type);
MO_GEN_set(meshbuffer[free].pkt,meshgen);
meshbuffer[free].flags=MF_USED;
}; };
return &meshbuffer[free]; return &meshbuffer[free];
}; };