implemented maomegui and renderliving patch