linktree - Multiplayer Online Role Playing Game  >  Atrinik News  >  Developers' Corner
linktree Topic: Dynamic loading of materials
Pages: [1]   Go Down
Author Topic: Dynamic loading of materials  (Read 1640 times)
0 Members and 1 Guest are viewing this topic. Bookmarked by 0 members.
Online Cleo
Alex Tokar

Posts: 580
Gender: Male
« on: September 28, 2009, 04:44:47 am »

Since r264, the material_real array loading is a bit different.

The material_real array used to be one huge array in object.c with almost 1 000 lines. All of the array entries are removed from the server code, and a function takes care to initialize default values for the whole array at startup.

After that, values from reference.db (this used to be helpfiles.db, now it was renamed as it contains both help files and materials) are pulled from table material_real, and replaced by the default ones in the array.

The index value where in the array the material should go is calculated automatically.
Pages: [1]   Go Up
Jump to: