MCPcopy Create free account
hub / github.com/diasurgical/devilution / AddVision

Function AddVision

Source/lighting.cpp:1177–1195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1175}
1176
1177int AddVision(int x, int y, int r, BOOL mine)
1178{
1179 int vid; // BUGFIX: if numvision >= MAXVISION behavior is undefined
1180
1181 if (numvision < MAXVISION) {
1182 VisionList[numvision]._lx = x;
1183 VisionList[numvision]._ly = y;
1184 VisionList[numvision]._lradius = r;
1185 vid = visionid++;
1186 VisionList[numvision]._lid = vid;
1187 VisionList[numvision]._ldel = 0;
1188 VisionList[numvision]._lunflag = 0;
1189 VisionList[numvision]._lflags = mine != 0;
1190 numvision++;
1191 dovision = TRUE;
1192 }
1193
1194 return vid;
1195}
1196
1197void ChangeVisionRadius(int id, int r)
1198{

Callers 2

On_PLAYER_JOINLEVELFunction · 0.85
InitPlayerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected